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") {
244244 }
245245}
246246
247- stage2_unix_toolchain (" stage2_baremetal_aarch64" ) {
248- toolchain_args = {
249- current_os = " baremetal"
250- current_cpu = " arm64"
251- }
252- }
253-
254247template (" win_toolchain" ) {
255248 toolchain (target_name ) {
256249 # 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") {
4242 " x86_64" ,
4343 ]
4444 }
45- } else if (current_os == " baremetal" ) {
46- target_flags += [ " --target=$llvm_current_triple " ]
4745}
4846
4947if (current_cpu == " x86" ) {
Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ if (current_os == "win") {
1212 supported_toolchains = [ " //llvm/utils/gn/build/toolchain:stage2_unix" ]
1313}
1414supported_toolchains += supported_android_toolchains
15- if (llvm_build_AArch64 ) {
16- supported_toolchains += [ " //llvm/utils/gn/build/toolchain:stage2_baremetal_aarch64" ]
17- }
1815group (" compiler-rt" ) {
1916 deps = [ " //compiler-rt/include($host_toolchain )" ]
2017 foreach (toolchain , supported_toolchains ) {
Original file line number Diff line number Diff line change @@ -2,23 +2,21 @@ group("lib") {
22 deps = [
33 " //compiler-rt/lib/asan:ignorelist($host_toolchain )" ,
44 " //compiler-rt/lib/cfi:ignorelist($host_toolchain )" ,
5+ " //compiler-rt/lib/profile" ,
56 ]
67 if (current_os == " linux" ) {
78 deps += [ " //compiler-rt/lib/msan" ]
89 }
910 if (current_os == " linux" || current_os == " android" ) {
1011 deps += [ " //compiler-rt/lib/ubsan_minimal" ]
1112 }
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+ ]
1418 if (current_cpu == " x64" || current_cpu == " arm64" ) {
1519 deps += [ " //compiler-rt/lib/tsan/rtl" ]
1620 }
1721 }
18- if (current_os != " win" ) {
19- deps += [ " //compiler-rt/lib/builtins" ]
20- }
21- if (current_os != " baremetal" ) {
22- deps += [ " //compiler-rt/lib/profile" ]
23- }
2422}
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import("//llvm/utils/gn/build/buildflags.gni")
44declare_args () {
55 # Skip the atomic builtin (should normally be provided by a shared library).
66 compiler_rt_exclude_atomic_builtin = true
7+
8+ # Compile builtins for baremetal.
9+ compiler_rt_baremetal_build = false
710}
811
912static_library (" builtins" ) {
@@ -167,17 +170,17 @@ static_library("builtins") {
167170 ]
168171
169172 if (current_os != " fuchsia" ) {
170- sources += [ " clear_cache.c" ]
171- }
172-
173- if (current_os != " fuchsia" && current_os != " baremetal" ) {
174173 sources += [
175174 " emutls.c" ,
176175 " enable_execute_stack.c" ,
177176 " eprintf.c" ,
178177 ]
179178 }
180179
180+ if (current_os != " fuchsia" && ! compiler_rt_baremetal_build ) {
181+ sources += [ " clear_cache.c" ]
182+ }
183+
181184 if (current_os == " mac" || current_os == " ios" ) {
182185 sources += [
183186 " 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) {
2828 }
2929} else if (current_os == " ios" || current_os == " mac" ) {
3030 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 "
3431} else if (current_os == " win" ) {
3532 crt_current_out_dir = " $clang_resource_dir /lib/windows"
3633 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") {
2323 llvm_current_triple = " aarch64-linux-android29"
2424 } else if (current_os == " ios" || current_os == " mac" ) {
2525 llvm_current_triple = " arm64-apple-darwin"
26- } else if (current_os == " baremetal" ) {
27- llvm_current_triple = " aarch64-elf"
2826 } else if (current_os == " linux" ) {
2927 llvm_current_triple = " aarch64-unknown-linux-gnu"
3028 }
You can’t perform that action at this time.
0 commit comments