feat: Lean.githash
This commit is contained in:
parent
6e45685310
commit
b5e7b2ab6e
2 changed files with 6 additions and 3 deletions
|
|
@ -22,9 +22,9 @@ def version.minor : Nat := version.getMinor ()
|
|||
private constant version.getPatch (u : Unit) : Nat
|
||||
def version.patch : Nat := version.getPatch ()
|
||||
|
||||
-- @[extern c inline "lean_mk_string(LEAN_GITHASH)"]
|
||||
-- constant getGithash (u : Unit) : String
|
||||
-- def githash : String := getGithash ()
|
||||
@[extern "lean_get_githash"]
|
||||
constant getGithash (u : Unit) : String
|
||||
def githash : String := getGithash ()
|
||||
|
||||
@[extern c inline "LEAN_VERSION_IS_RELEASE"]
|
||||
constant version.getIsRelease (u : Unit) : Bool
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Author: Leonardo de Moura
|
||||
*/
|
||||
#include "runtime/object.h"
|
||||
#include "githash.h"
|
||||
|
||||
namespace lean {
|
||||
extern "C" LEAN_EXPORT obj_res lean_system_platform_nbits(obj_arg) {
|
||||
|
|
@ -38,4 +39,6 @@ extern "C" LEAN_EXPORT uint8 lean_system_platform_emscripten(obj_arg) {
|
|||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" object * lean_get_githash() { return lean_mk_string(LEAN_GITHASH); }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue