summaryrefslogtreecommitdiff
path: root/build-0004-change-set-for-obs-build.patch
blob: 7fa7a2f8aa7313521a77d318d5e738a3759f0631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
+  }
 }