aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
authorJonathan Schwender <55576758+jschwe@users.noreply.github.com>2024-08-14 09:30:04 +0800
committerGitHub <noreply@github.com>2024-08-14 01:30:04 +0000
commit3aef023368d522251d72443e1b5c03c2fc3208d3 (patch)
treeedf747d00eddaef8ea3847cd47c7cd000a0d84bd /python/servo
parent478d95d2454f15184b45c5887af05c1cf51d2b23 (diff)
downloadservo-3aef023368d522251d72443e1b5c03c2fc3208d3.tar.gz
servo-3aef023368d522251d72443e1b5c03c2fc3208d3.zip
ohos: Fix x86_64-unknown-linux-ohos (#33029)
* ohos: Fix compilation for x86_64 Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> * ohos: Use the SDK compiler-wrapper When compiling for x86_64-unknown-linux-ohos without the compiler wrapper, for some reason mozjs_sys will be refercing a wrong mangled symbol resulting in the following error when loading the .so at runtime: ``` _ZNSt3__111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE: symbol not found ``` This problem does not occur when compiling for aarch64 or when using the compiler wrapper. In this case the correct symbol `_ZNSt4__n111this_thread9sleep_forERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEE` is referenced. It's unclear why manually passing the flags via CFLAGS / CXXFLAGS does not work. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com> --------- Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/command_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 608f44d636d..a9b62f9558e 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -748,8 +748,8 @@ class CommandBase(object):
env['TARGET_STRIP'] = to_sdk_llvm_bin("llvm-strip")
rust_target_triple = str(self.cross_compile_target).replace('-', '_')
- ndk_clang = to_sdk_llvm_bin("clang")
- ndk_clangxx = to_sdk_llvm_bin("clang++")
+ ndk_clang = to_sdk_llvm_bin(f"{self.cross_compile_target}-clang")
+ ndk_clangxx = to_sdk_llvm_bin(f"{self.cross_compile_target}-clang++")
env[f'CC_{rust_target_triple}'] = ndk_clang
env[f'CXX_{rust_target_triple}'] = ndk_clangxx
# The clang target name is different from the LLVM target name