@@ -71,6 +71,28 @@ exec /path/to/ohos-sdk/linux/native/llvm/bin/clang++ \
71
71
" $@ "
72
72
```
73
73
74
+ ` x86_64-unknown-linux-ohos-clang.sh `
75
+
76
+ ``` sh
77
+ #! /bin/sh
78
+ exec /path/to/ohos-sdk/linux/native/llvm/bin/clang \
79
+ -target x86_64-linux-ohos \
80
+ --sysroot=/path/to/ohos-sdk/linux/native/sysroot \
81
+ -D__MUSL__ \
82
+ " $@ "
83
+ ```
84
+
85
+ ` x86_64-unknown-linux-ohos-clang++.sh `
86
+
87
+ ``` sh
88
+ #! /bin/sh
89
+ exec /path/to/ohos-sdk/linux/native/llvm/bin/clang++ \
90
+ -target x86_64-linux-ohos \
91
+ --sysroot=/path/to/ohos-sdk/linux/native/sysroot \
92
+ -D__MUSL__ \
93
+ " $@ "
94
+ ```
95
+
74
96
Future versions of the OpenHarmony SDK will avoid the need for this process.
75
97
76
98
## Building the target
@@ -98,6 +120,13 @@ cxx = "/path/to/armv7-unknown-linux-ohos-clang++.sh"
98
120
ar = " /path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
99
121
ranlib = " /path/to/ohos-sdk/linux/native/llvm/bin/llvm-ranlib"
100
122
linker = " /path/to/armv7-unknown-linux-ohos-clang.sh"
123
+
124
+ [target .x86_64-unknown-linux-ohos ]
125
+ cc = " /path/to/x86_64-unknown-linux-ohos-clang.sh"
126
+ cxx = " /path/to/x86_64-unknown-linux-ohos-clang++.sh"
127
+ ar = " /path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
128
+ ranlib = " /path/to/ohos-sdk/linux/native/llvm/bin/llvm-ranlib"
129
+ linker = " /path/to/x86_64-unknown-linux-ohos-clang.sh"
101
130
```
102
131
103
132
## Building Rust programs
@@ -116,6 +145,10 @@ linker = "/path/to/aarch64-unknown-linux-ohos-clang.sh"
116
145
[target .armv7-unknown-linux-ohos ]
117
146
ar = " /path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
118
147
linker = " /path/to/armv7-unknown-linux-ohos-clang.sh"
148
+
149
+ [target .x86_64-unknown-linux-ohos ]
150
+ ar = " /path/to/ohos-sdk/linux/native/llvm/bin/llvm-ar"
151
+ linker = " /path/to/x86_64-unknown-linux-ohos-clang.sh"
119
152
```
120
153
121
154
## Testing
0 commit comments