summaryrefslogtreecommitdiff
path: root/build-0004-change-set-for-obs-build.patch
diff options
context:
space:
mode:
Diffstat (limited to 'build-0004-change-set-for-obs-build.patch')
-rw-r--r--build-0004-change-set-for-obs-build.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/build-0004-change-set-for-obs-build.patch b/build-0004-change-set-for-obs-build.patch
new file mode 100644
index 0000000..7fa7a2f
--- /dev/null
+++ b/build-0004-change-set-for-obs-build.patch
@@ -0,0 +1,73 @@
+diff -Naur build-OpenHarmony-v3.0.2-LTS/config/sanitizers/BUILD.gn build-OpenHarmony-v3.0.2-LTS-path2/config/sanitizers/BUILD.gn
+--- build-OpenHarmony-v3.0.2-LTS/config/sanitizers/BUILD.gn 2022-02-26 17:17:05.000000000 +0800
++++ build-OpenHarmony-v3.0.2-LTS-path2/config/sanitizers/BUILD.gn 2022-07-14 11:50:09.927655500 +0800
+@@ -678,6 +678,8 @@
+ }
+ }
+
++ print(_clang_rt_libs_dir)
++
+ foreach(rt_lib, _dso_names) {
+ _clang_rt_dso_paths += [ "$_clang_rt_libs_dir/${rt_lib}" ]
+ }
+diff -Naur build-OpenHarmony-v3.0.2-LTS/loader/preloader/platforms.template build-OpenHarmony-v3.0.2-LTS-path2/loader/preloader/platforms.template
+--- build-OpenHarmony-v3.0.2-LTS/loader/preloader/platforms.template 2022-07-14 11:49:08.352875000 +0800
++++ build-OpenHarmony-v3.0.2-LTS-path2/loader/preloader/platforms.template 2022-07-14 11:06:07.951920300 +0800
+@@ -12,6 +12,12 @@
+ "target_cpu": "arm",
+ "toolchain": "//build/toolchain/linux:arm",
+ "parts_config": "./parts.json"
++ },
++ {
++ "target_os": "ohos",
++ "target_cpu": "x86_64",
++ "toolchain": "//build/toolchain/linux:x86_64",
++ "parts_config": "./parts.json"
+ }
+ ]
+ }
+diff -Naur build-OpenHarmony-v3.0.2-LTS/toolchain/linux/BUILD.gn build-OpenHarmony-v3.0.2-LTS-path2/toolchain/linux/BUILD.gn
+--- build-OpenHarmony-v3.0.2-LTS/toolchain/linux/BUILD.gn 2022-07-14 11:49:08.511178900 +0800
++++ build-OpenHarmony-v3.0.2-LTS-path2/toolchain/linux/BUILD.gn 2022-07-14 11:10:51.681272300 +0800
+@@ -25,6 +25,8 @@
+ tool_path = rebase_path("//toolchain/bin", root_build_dir)
+ toolprefix = "${tool_path}/aarch64-openeuler-linux-gnu-"
+
++ toolprefix = ""
++
+ cc = "${toolprefix}gcc"
+ cxx = "${toolprefix}g++"
+
+@@ -45,6 +47,8 @@
+ tool_path = rebase_path("//toolchain/bin", root_build_dir)
+ toolprefix = "${tool_path}/arm-openeuler-linux-gnu-"
+
++ toolprefix = ""
++
+ cc = "${toolprefix}gcc"
+ cxx = "${toolprefix}g++"
+
+@@ -120,4 +124,23 @@
+ current_os = "linux"
+ is_clang = false
+ }
++}
++
++gcc_toolchain("x86_64") {
++ cc = "gcc"
++ cxx = "g++"
++
++ readelf = "readelf"
++ nm = "nm"
++ ar = "ar"
++ ld = cxx
++
++ # Output linker map files for binary size analysis.
++ enable_linker_map = true
++
++ toolchain_args = {
++ current_cpu = "x86_64"
++ current_os = "linux"
++ is_clang = false
++ }
+ }