forked from semios/semios-packages
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e7d77b63b3 |
@@ -130,6 +130,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)
|
||||
|
||||
@@ -143,7 +144,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
|
||||
@@ -187,6 +188,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")
|
||||
@@ -249,9 +251,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