Skip to content

Commit

Permalink
add noCloudRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiyu Yang committed Sep 13, 2023
1 parent 133b491 commit 8cf4933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lakefile.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ open Lake DSL System


package LeanInfer {
preferReleaseBuild := true
preferReleaseBuild := get_config? noCloudRelease |>.isNone
precompileModules := true
buildType := BuildType.release
moreLinkArgs := #[s!"-L{__dir__}/build/lib", "-lonnxruntime", "-lstdc++"]
Expand Down Expand Up @@ -217,7 +217,7 @@ target libonnxruntime pkg : FilePath := do

def buildCpp (pkg : Package) (path : FilePath) (deps : List (BuildJob FilePath)) : SchedulerM (BuildJob FilePath) := do
let optLevel := if pkg.buildType == BuildType.release then "-O3" else "-O0"
let flags := #["-fPIC", "-std=c++11", "-stdlib=libc++", optLevel]
let flags := #["-fPIC", "-std=c++11", "-stdlib=libc++", "--target=arm64-apple-macos11", optLevel]
let args := flags ++ #["-I", (← getLeanIncludeDir).toString, "-I", (pkg.buildDir / "include").toString]
let oFile := pkg.buildDir / (path.withExtension "o")
let srcJob ← inputFile <| pkg.dir / path
Expand Down

0 comments on commit 8cf4933

Please sign in to comment.