Skip to content

Commit

Permalink
fix(build): link using lld-14 explictly
Browse files Browse the repository at this point in the history
  • Loading branch information
priyasiddharth committed Jan 23, 2024
1 parent d1ca2d4 commit 36ab145
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ set(SEA_PP "${SEAHORN_ROOT}/bin/seapp" CACHE STRING "Path to seapp binary")

set(LLVM_OBJCOPY "llvm-objcopy-14" CACHE STRING "Path to llvm-objcopy")
set(LLVM_DIS "llvm-dis-14" CACHE STRING "Path to llvm-dis")
set(LLD "lld-14" CACHE STRING "Path to lld")
set(LLVM_NM ${DEFAULT_LLVM_NM} CACHE PATH "Path to llvm-nm")

set(LLVMIR_LINK ${SEA_LINK})
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ opt-level = 2
rustflags = [
"-Clinker-plugin-lto",
"-Clinker=clang-14",
"-Clink-arg=-fuse-ld=lld",
"-Clink-arg=-fuse-ld=lld-14",
"-Zemit-thin-lto=no",
]

Expand All @@ -24,7 +24,7 @@ opt-level = 2
rustflags = [
"-Clinker-plugin-lto",
"-Clinker=clang-14",
"-Clink-arg=-fuse-ld=lld",
"-Clink-arg=-fuse-ld=lld-14",
"-Zemit-thin-lto=no"
]

Expand Down
2 changes: 1 addition & 1 deletion cmake/SeaHornBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function(c_rust_llvm TARGET SRC_FILES)
# Still do optimization for the executable (XXX is this needed?)
target_link_options(${TARGET} PUBLIC
-flto
-fuse-ld=lld
-fuse-ld=${LLD}
-Wl,--plugin-opt=-lto-embed-bitcode=post-merge-pre-opt
--target=${ARCH}
-O1
Expand Down

0 comments on commit 36ab145

Please sign in to comment.