Merge pull request 'fix: llvm build configuration has invalid fields' (#141) from sisungo/semios-packages:llvmfix into master
Reviewed-on: #141
This commit was merged in pull request #141.
This commit is contained in:
@@ -131,6 +131,7 @@ def build_clang():
|
||||
"-DCLANG_DEFAULT_CXX_STDLIB=libc++",
|
||||
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||
f"-DC_INCLUDE_DIRS=/lib/{arch.get_target()}/include",
|
||||
]
|
||||
cmake("clang", import_llvm() + options)
|
||||
|
||||
@@ -144,7 +145,7 @@ def build_polly():
|
||||
cmake("polly", import_llvm())
|
||||
|
||||
def build_runtimes():
|
||||
cflags = f"-isystem /lib/{arch.get_target()}/include -L/lib/{arch.get_target()} -B/lib/{arch.get_target()} -rtlib=compiler-rt"
|
||||
os.makedirs("../_build_runtimes", exist_ok=True)
|
||||
shutil.rmtree("../_build_runtimes")
|
||||
options = [
|
||||
# Configure runtimes
|
||||
@@ -188,6 +189,7 @@ dep("semi-libc @same-arch")
|
||||
dep("libunwind @same-arch")
|
||||
dep("libcxx @same-arch")
|
||||
dep("libcxxabi @same-arch")
|
||||
dep("libffi @same-arch")
|
||||
on_pack(lambda composer: auto_pack_glob(composer, ["lib/*.so*"]))
|
||||
|
||||
package("libllvm-dev")
|
||||
@@ -250,9 +252,6 @@ def pack_clang(composer):
|
||||
lrtlib = rtlib.replace(f"-{larch}", "")
|
||||
composer.addfile(f"{linuxrtdir}/{rtlib}", f"{localrtdir}/{lrtlib}")
|
||||
|
||||
# Add symlink to system directories
|
||||
os.symlink(f"/lib/{arch.get_target()}/include", f"{composer.workdir}/bundle/include")
|
||||
|
||||
# Add configuration
|
||||
clang_cfg = f"-L/lib/{arch.get_target()}\n-B/lib/{arch.get_target()}\n-rtlib=compiler-rt\n"
|
||||
clangxx_cfg = f"-stdlib=libc++\n{clang_cfg}"
|
||||
|
||||
Reference in New Issue
Block a user