feature: update build

Change-Id: If30bc6e1ae14e1151af8286901df1908dd669127
This commit is contained in:
2025-05-27 17:23:07 +08:00
parent eed3729947
commit 2329276ddd
13 changed files with 72 additions and 16 deletions

View 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]

View File

@@ -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")

View File

@@ -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}

View File

@@ -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}

View File

@@ -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}

View File

@@ -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}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

8
pkgconfig/libclc.pc Normal file
View File

@@ -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}

View File

@@ -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,
)

View File

@@ -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]