diff --git a/cross_file b/cross_file index 72461ff13dc..a9677cacc18 100644 --- a/cross_file +++ b/cross_file @@ -1,6 +1,6 @@ [properties] -needs_exe_wrapper = true +needs_exe_wrapper = false c_args = [ '-march=x86-64', @@ -14,6 +14,7 @@ cpp_args = [ '--target=x86_64-linux-ohosmusl', '--sysroot=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/out/surface/obj/third_party/musl', '-fPIC', + '-stdlib=libc++', '-fno-emulated-tls'] c_link_args = [ @@ -24,6 +25,7 @@ c_link_args = [ '-L/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/out/surface/obj/third_party/musl/usr/lib/x86_64-linux-ohos', '-L/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/prebuilts/clang/ohos/linux-x86_64/15.0.4/lib/x86_64-linux-ohos', '-L/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/prebuilts/clang/ohos/linux-x86_64/15.0.4/llvm/include/x86_64-linux-ohos/c++', + '-L/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/llvm-project-llvmorg-15.0.4/build/lib', '--rtlib=compiler-rt', ] @@ -39,7 +41,7 @@ cpp_link_args = [ '-Wl,--exclude-libs=libc++_static.a', '-Wl,--warn-shared-textrel', '--rtlib=compiler-rt', - '-L/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/third_party/mesa3d/subprojects/llvm', + '-L/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/llvm-project-llvmorg-15.0.4/build/lib', '-lLLVMMCDisassembler', '-lLLVMSelectionDAG', '-lLLVMExtensions', @@ -91,7 +93,6 @@ cpp_link_args = [ '-lLLVMVectorize', '-lLLVMX86CodeGen', '-lLLVMAMDGPUUtils', - '-lLLVMParts', '-lLLVMDebugInfoMSF', '-lLLVMXRay', '-lLLVMPasses', @@ -126,6 +127,8 @@ cpp_link_args = [ '-lLLVMFuzzMutate', '-lLLVMCoverage', '-lLLVMOrcJIT', + '-lSPIRV-Tools', + '-lc++' ] [binaries] @@ -134,8 +137,8 @@ c = ['ccache', '/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/prebuilts/clan cpp = ['ccache', '/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang++'] c_ld= 'lld' cpp_ld = 'lld' -strip = '/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/llvm-project-llvmorg-18.1.8/build/bin/llvm-strip' -llvm-config = '/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/llvm-project-llvmorg-18.1.8/build/bin/llvm-config' +strip = '/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install/bin/llvm-strip' +llvm-config = '/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install/bin/llvm-config' pkgconfig = '/usr/bin/pkg-config' [host_machine] diff --git a/ohos/meson_cross_process_x86.py b/ohos/meson_cross_process_x86.py index f3530aec92d..bd23252ce97 100644 --- a/ohos/meson_cross_process_x86.py +++ b/ohos/meson_cross_process_x86.py @@ -30,7 +30,7 @@ project_stub = 'project_stub' corss_file_content=''' [properties] -needs_exe_wrapper = true +needs_exe_wrapper = false c_args = [ '-march=x86-64', @@ -69,7 +69,7 @@ cpp_link_args = [ '-Wl,--exclude-libs=libc++_static.a', '-Wl,--warn-shared-textrel', '--rtlib=compiler-rt', - '-Lproject_stub/third_party/mesa3d/subprojects/llvm', + '-Lproject_stub/tools/compiler/install/lib', '-lLLVMMCDisassembler', '-lLLVMSelectionDAG', '-lLLVMExtensions', @@ -164,8 +164,8 @@ c = ['ccache', 'project_stub/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang'] cpp = ['ccache', 'project_stub/prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang++'] c_ld= 'lld' cpp_ld = 'lld' -strip = 'project_stub/tools/llvm-project-llvmorg-18.1.8/build/bin/llvm-strip' -llvm-config = 'project_stub/tools/llvm-project-llvmorg-18.1.8/build/bin/llvm-config' +strip = 'project_stub/tools/compiler/install/bin/llvm-strip' +llvm-config = 'project_stub/tools/compiler/install/bin/llvm-config' pkgconfig = '/usr/bin/pkg-config' [host_machine] @@ -192,6 +192,7 @@ def generate_pc_file(file_raw, project_dir, product_name): raw_content = file_raw.read() raw_content = raw_content.replace("ohos_project_directory_stub", project_dir) raw_content = raw_content.replace("ohos-arm-release", product_name) + raw_content = raw_content.replace("ohos-arm", "ohos-x86_64") pc_file.write(raw_content) print("generate_pc_file") diff --git a/ohos/pkgconfig_template/LLVMSPIRVLib.pc b/ohos/pkgconfig_template/LLVMSPIRVLib.pc new file mode 100644 index 00000000000..055f19aaa1a --- /dev/null +++ b/ohos/pkgconfig_template/LLVMSPIRVLib.pc @@ -0,0 +1,12 @@ +prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: LLVMSPIRVLib +Description: LLVM/SPIR-V bi-directional translator +Version: 15.0.0.0 +URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator + +Libs: -L${libdir} -lLLVMSPIRVLib +Cflags: -I${includedir} diff --git a/ohos/pkgconfig_template/SPIRV-Tools-shared.pc b/ohos/pkgconfig_template/SPIRV-Tools-shared.pc new file mode 100644 index 00000000000..3483d539006 --- /dev/null +++ b/ohos/pkgconfig_template/SPIRV-Tools-shared.pc @@ -0,0 +1,12 @@ +prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: SPIRV-Tools +Description: Tools for SPIR-V +Version: 2024.4.1 +URL: https://github.com/KhronosGroup/SPIRV-Tools + +Libs: -L${libdir} -lSPIRV-Tools-shared +Cflags: -I${includedir} diff --git a/ohos/pkgconfig_template/SPIRV-Tools.pc b/ohos/pkgconfig_template/SPIRV-Tools.pc new file mode 100644 index 00000000000..0c3023ed4ae --- /dev/null +++ b/ohos/pkgconfig_template/SPIRV-Tools.pc @@ -0,0 +1,12 @@ +prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: SPIRV-Tools +Description: Tools for SPIR-V +Version: 2024.4.1 +URL: https://github.com/KhronosGroup/SPIRV-Tools + +Libs: -L${libdir} -lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link +Cflags: -I${includedir} diff --git a/ohos/pkgconfig_template/libclc.pc b/ohos/pkgconfig_template/libclc.pc new file mode 100644 index 00000000000..dede9010a50 --- /dev/null +++ b/ohos/pkgconfig_template/libclc.pc @@ -0,0 +1,8 @@ +includedir=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install/include +libexecdir=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install/share/clc + +Name: libclc +Description: Library requirements of the OpenCL C programming language +Version: 0.2.0 +Cflags: -I${includedir} +Libs: -L${libexecdir} diff --git a/ohos/pkgconfig_template/libsurface.pc b/ohos/pkgconfig_template/libsurface.pc index 62fff8b0757..af31e40d6ba 100644 --- a/ohos/pkgconfig_template/libsurface.pc +++ b/ohos/pkgconfig_template/libsurface.pc @@ -1,6 +1,6 @@ ohos_project_dir=ohos_project_directory_stub libdir=${ohos_project_dir}/out/ohos-arm-release/graphic/graphic_surface/ -includedir=${ohos_project_dir}/out/ohos-arm-release/innerkits/ohos-x86_64/graphic_surface/surface/include/ +includedir=${ohos_project_dir}/out/ohos-arm-release/innerkits/ohos-arm/graphic_surface/surface/include/ Name: libsurface Version: 2.4.1 diff --git a/pkgconfig/LLVMSPIRVLib.pc b/pkgconfig/LLVMSPIRVLib.pc index 2bfb52a7629..055f19aaa1a 100644 --- a/pkgconfig/LLVMSPIRVLib.pc +++ b/pkgconfig/LLVMSPIRVLib.pc @@ -1,11 +1,11 @@ -prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/SPIRV-LLVM-Translator-18.1.12/build +prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include Name: LLVMSPIRVLib Description: LLVM/SPIR-V bi-directional translator -Version: 18.1.0.0 +Version: 15.0.0.0 URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator Libs: -L${libdir} -lLLVMSPIRVLib diff --git a/pkgconfig/SPIRV-Tools-shared.pc b/pkgconfig/SPIRV-Tools-shared.pc index 55b75e0553e..3483d539006 100644 --- a/pkgconfig/SPIRV-Tools-shared.pc +++ b/pkgconfig/SPIRV-Tools-shared.pc @@ -1,4 +1,4 @@ -prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/SPIRV-Tools-2024.4/build +prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include diff --git a/pkgconfig/SPIRV-Tools.pc b/pkgconfig/SPIRV-Tools.pc index b4efda71a30..0c3023ed4ae 100644 --- a/pkgconfig/SPIRV-Tools.pc +++ b/pkgconfig/SPIRV-Tools.pc @@ -1,4 +1,4 @@ -prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/SPIRV-Tools-2024.4/build +prefix=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include diff --git a/pkgconfig/libclc.pc b/pkgconfig/libclc.pc new file mode 100644 index 00000000000..dede9010a50 --- /dev/null +++ b/pkgconfig/libclc.pc @@ -0,0 +1,8 @@ +includedir=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install/include +libexecdir=/home/geekyharmony/ohsc/OpenHarmony-5.1.0-Release/tools/compiler/install/share/clc + +Name: libclc +Description: Library requirements of the OpenCL C programming language +Version: 0.2.0 +Cflags: -I${includedir} +Libs: -L${libexecdir} diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build index 74767d08de2..7e2f4dc4fb5 100644 --- a/src/compiler/clc/meson.build +++ b/src/compiler/clc/meson.build @@ -127,5 +127,5 @@ prog_mesa_clc = executable( # If we can run host binaries directly, just build mesa_clc for the host. # Most commonly this happens when doing a cross compile from an x86_64 build # machine to an x86 host - native : not meson.can_run_host_binaries(), + native : false, ) diff --git a/src/intel/compiler/meson.build b/src/intel/compiler/meson.build index 718b080a38b..ff4626486ff 100644 --- a/src/intel/compiler/meson.build +++ b/src/intel/compiler/meson.build @@ -183,7 +183,7 @@ elif with_intel_clc # If we can run host binaries directly, just build intel_clc for the host. # Most commonly this happens when doing a cross compile from an x86_64 build # machine to an x86 host - native : not meson.can_run_host_binaries(), + native : false, install : get_option('install-intel-clc'), ) dep_prog_intel_clc = [prog_intel_clc]