diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py index f3f7153e734004be42ecf471a3fce5bf08dccfbf..6fb667ccb6d34838e61b821b34d0c06681f99526 100644 --- a/compiler-rt/test/lit.common.cfg.py +++ b/compiler-rt/test/lit.common.cfg.py @@ -499,10 +499,10 @@ if config.android: adb = os.environ.get('ADB', 'adb') - # These are needed for tests to upload/download temp files, such as - # suppression-files, to device. - config.substitutions.append( ('%device_rundir/', "/data/local/tmp/Output/") ) if not config.host_os == 'OHOS': + # These are needed for tests to upload/download temp files, such as + # suppression-files, to device. + config.substitutions.append( ('%device_rundir/', "/data/local/tmp/Output/") ) config.substitutions.append( ('%push_to_device', "%s -s '%s' push " % (adb, env['ANDROID_SERIAL']) ) ) config.substitutions.append( ('%adb_shell ', "%s -s '%s' shell " % (adb, env['ANDROID_SERIAL']) ) ) config.substitutions.append( ('%device_rm', "%s -s '%s' shell 'rm ' " % (adb, env['ANDROID_SERIAL']) ) ) diff --git a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py index 88cdb2d5ff443677a76d657fd483ede471ecca97..6b061e9e0f10c99fb00e72c0b1a2fe8498743efa 100755 --- a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py +++ b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py @@ -55,7 +55,9 @@ def push_to_device(path): dst_path = host_to_device_path(path) # hdc do not auto create directories on device hdc(['shell', 'mkdir', '-p', os.path.dirname(dst_path)]) - hdc(['file', 'send', '-m', path, dst_path], attempts=5, check_stdout='FileTransfer finish') + hdc(['file', 'send', path, dst_path], attempts=5, check_stdout='FileTransfer finish') + file_mode = oct(os.stat(path).st_mode)[-3:] + hdc(['shell', 'chmod', file_mode, dst_path]) def map_path(path, do_push): if os.path.exists(path): @@ -122,4 +124,4 @@ def get_output_from_args(args): elif arg == '-o': output = args.pop(0) - return output, output_type \ No newline at end of file + return output, output_type diff --git a/llvm-build/build.py b/llvm-build/build.py index c0a88a1ce3f6640c79895d063a3e87486e8c2191..00096f0338a5cc977f38c6e08ca6b6130bff00bd 100755 --- a/llvm-build/build.py +++ b/llvm-build/build.py @@ -1085,7 +1085,7 @@ class LlvmCore(BuildUtils): '-Wl,--gc-sections', '-stdlib=libc++', '--rtlib=compiler-rt', - '-lunwind', + '-lunwind', '-Wl,--dynamicbase', '-Wl,--nxcompat', '-lucrt', @@ -1203,10 +1203,10 @@ class SysrootComposer(BuildUtils): python_execute_dir = os.path.join( self.get_python_dir(), 'bin', self.build_config.LLDB_PYTHON) llvm_gn_args = 'is_llvm_build=true startup_init_with_param_base=true use_thin_lto=false' - subprocess.run([python_execute_dir, hb_build_py, 'build', '--product-name', product_name, '--target-cpu', + self.check_call([python_execute_dir, hb_build_py, 'build', '--product-name', product_name, '--target-cpu', target_cpu, '--build-target', target_name, '--gn-args', gn_args, llvm_gn_args, '--deps-guard=false'], - shell=False, stdout=subprocess.PIPE, cwd=self.build_config.REPOROOT_DIR) + cwd=self.build_config.REPOROOT_DIR) def build_musl_libs(self, product_name, target_cpu, target_name, ohos_lib_dir, sysroot_lib_dir, ld_musl_lib, gn_args=''): @@ -2199,17 +2199,17 @@ class LlvmLibs(BuildUtils): if multilib_suffix: baseline_abi_file_path = self.merge_out_path(self.build_config.LLVM_BUILD_DIR, "libcxx_abidiff", llvm_triple, multilib_suffix, "libc++_shared.abi") - elf_common_path = self.merge_out_path('lib', + elf_common_path = self.merge_out_path('lib', f"libunwind-libcxxabi-libcxx-ndk-{str(llvm_triple)}-{multilib_suffix}", 'lib', llvm_triple, multilib_suffix) else: baseline_abi_file_path = self.merge_out_path(self.build_config.LLVM_BUILD_DIR, "libcxx_abidiff", llvm_triple, "libc++_shared.abi") - elf_common_path = self.merge_out_path('lib', + elf_common_path = self.merge_out_path('lib', f"libunwind-libcxxabi-libcxx-ndk-{str(llvm_triple)}", 'lib', llvm_triple) elf_file_path = self.merge_out_path(elf_common_path, "libc++_shared.so") abi_file_path = self.merge_out_path(elf_common_path, "libc++_shared.abi") - header_dir = self.merge_out_path('lib', + header_dir = self.merge_out_path('lib', f"libunwind-libcxxabi-libcxx-ndk-{str(llvm_triple)}", 'include', "c++", "v1") res = self.run_abi_check(elf_file_path, abi_file_path, baseline_abi_file_path, header_dir) if res: