File tree Expand file tree Collapse file tree 7 files changed +13
-29
lines changed Expand file tree Collapse file tree 7 files changed +13
-29
lines changed Original file line number Diff line number Diff line change @@ -244,13 +244,6 @@ if (host_os == "mac") {
244
244
}
245
245
}
246
246
247
- stage2_unix_toolchain (" stage2_baremetal_aarch64" ) {
248
- toolchain_args = {
249
- current_os = " baremetal"
250
- current_cpu = " arm64"
251
- }
252
- }
253
-
254
247
template (" win_toolchain" ) {
255
248
toolchain (target_name ) {
256
249
# https://groups.google.com/a/chromium.org/d/msg/gn-dev/F_lv5T-tNDM
Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ if (current_os == "android") {
42
42
" x86_64" ,
43
43
]
44
44
}
45
- } else if (current_os == " baremetal" ) {
46
- target_flags += [ " --target=$llvm_current_triple " ]
47
45
}
48
46
49
47
if (current_cpu == " x86" ) {
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ if (current_os == "win") {
12
12
supported_toolchains = [ " //llvm/utils/gn/build/toolchain:stage2_unix" ]
13
13
}
14
14
supported_toolchains += supported_android_toolchains
15
- if (llvm_build_AArch64 ) {
16
- supported_toolchains += [ " //llvm/utils/gn/build/toolchain:stage2_baremetal_aarch64" ]
17
- }
18
15
group (" compiler-rt" ) {
19
16
deps = [ " //compiler-rt/include($host_toolchain )" ]
20
17
foreach (toolchain , supported_toolchains ) {
Original file line number Diff line number Diff line change @@ -2,23 +2,21 @@ group("lib") {
2
2
deps = [
3
3
" //compiler-rt/lib/asan:ignorelist($host_toolchain )" ,
4
4
" //compiler-rt/lib/cfi:ignorelist($host_toolchain )" ,
5
+ " //compiler-rt/lib/profile" ,
5
6
]
6
7
if (current_os == " linux" ) {
7
8
deps += [ " //compiler-rt/lib/msan" ]
8
9
}
9
10
if (current_os == " linux" || current_os == " android" ) {
10
11
deps += [ " //compiler-rt/lib/ubsan_minimal" ]
11
12
}
12
- if (current_os != " win" && current_os != " baremetal" ) {
13
- deps += [ " //compiler-rt/lib/asan" ]
13
+ if (current_os != " win" ) {
14
+ deps += [
15
+ " //compiler-rt/lib/asan" ,
16
+ " //compiler-rt/lib/builtins" ,
17
+ ]
14
18
if (current_cpu == " x64" || current_cpu == " arm64" ) {
15
19
deps += [ " //compiler-rt/lib/tsan/rtl" ]
16
20
}
17
21
}
18
- if (current_os != " win" ) {
19
- deps += [ " //compiler-rt/lib/builtins" ]
20
- }
21
- if (current_os != " baremetal" ) {
22
- deps += [ " //compiler-rt/lib/profile" ]
23
- }
24
22
}
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import("//llvm/utils/gn/build/buildflags.gni")
4
4
declare_args () {
5
5
# Skip the atomic builtin (should normally be provided by a shared library).
6
6
compiler_rt_exclude_atomic_builtin = true
7
+
8
+ # Compile builtins for baremetal.
9
+ compiler_rt_baremetal_build = false
7
10
}
8
11
9
12
static_library (" builtins" ) {
@@ -167,17 +170,17 @@ static_library("builtins") {
167
170
]
168
171
169
172
if (current_os != " fuchsia" ) {
170
- sources += [ " clear_cache.c" ]
171
- }
172
-
173
- if (current_os != " fuchsia" && current_os != " baremetal" ) {
174
173
sources += [
175
174
" emutls.c" ,
176
175
" enable_execute_stack.c" ,
177
176
" eprintf.c" ,
178
177
]
179
178
}
180
179
180
+ if (current_os != " fuchsia" && ! compiler_rt_baremetal_build ) {
181
+ sources += [ " clear_cache.c" ]
182
+ }
183
+
181
184
if (current_os == " mac" || current_os == " ios" ) {
182
185
sources += [
183
186
" atomic_flag_clear.c" ,
Original file line number Diff line number Diff line change @@ -28,9 +28,6 @@ if (clang_enable_per_target_runtime_dir) {
28
28
}
29
29
} else if (current_os == " ios" || current_os == " mac" ) {
30
30
crt_current_out_dir = " $clang_resource_dir /lib/darwin"
31
- } else if (current_os == " baremetal" ) {
32
- crt_current_out_dir = " $clang_resource_dir /lib/baremetal"
33
- crt_current_target_suffix = " -$crt_current_target_arch "
34
31
} else if (current_os == " win" ) {
35
32
crt_current_out_dir = " $clang_resource_dir /lib/windows"
36
33
crt_current_target_suffix = " -$crt_current_target_arch "
Original file line number Diff line number Diff line change @@ -23,8 +23,6 @@ if (current_cpu == "x86") {
23
23
llvm_current_triple = " aarch64-linux-android29"
24
24
} else if (current_os == " ios" || current_os == " mac" ) {
25
25
llvm_current_triple = " arm64-apple-darwin"
26
- } else if (current_os == " baremetal" ) {
27
- llvm_current_triple = " aarch64-elf"
28
26
} else if (current_os == " linux" ) {
29
27
llvm_current_triple = " aarch64-unknown-linux-gnu"
30
28
}
You can’t perform that action at this time.
0 commit comments