File tree Expand file tree Collapse file tree 7 files changed +25
-3
lines changed
Expand file tree Collapse file tree 7 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ config("compiler_defaults") {
356356 }
357357 if ((current_os == " ios" || current_os == " mac" ) &&
358358 (clang_base_path != " " || sysroot != " " )) {
359- if (current_os == " ios" && current_cpu == " arm64" ) {
359+ if (current_os == " ios" && ( current_cpu == " arm64" || current_cpu == " arm64e " ) ) {
360360 sdk_path = ios_sdk_path
361361 } else if (current_os == " ios" && current_cpu == " x64" ) {
362362 sdk_path = iossim_sdk_path
Original file line number Diff line number Diff line change @@ -244,6 +244,13 @@ if (host_os == "mac") {
244244 }
245245 }
246246
247+ stage2_unix_toolchain (" stage2_ios_arm64e" ) {
248+ toolchain_args = {
249+ current_os = " ios"
250+ current_cpu = " arm64e"
251+ }
252+ }
253+
247254 stage2_unix_toolchain (" stage2_iossim_x64" ) {
248255 toolchain_args = {
249256 current_os = " ios"
Original file line number Diff line number Diff line change @@ -32,6 +32,15 @@ if (current_os == "android") {
3232 " -arch" ,
3333 " arm64" ,
3434 ]
35+ } else if (current_cpu == " arm64e" ) {
36+ target_flags += [
37+ " -arch" ,
38+ " arm64e" ,
39+ ]
40+ target_ldflags += [
41+ " -arch" ,
42+ " arm64e" ,
43+ ]
3544 } else if (current_cpu == " x64" ) {
3645 target_flags += [
3746 " -arch" ,
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ group("compiler-rt") {
2828 # That would match the cmake build.
2929 if (host_os == " mac" && have_ios_sdks ) {
3030 if (llvm_build_AArch64 ) {
31- deps += [ " //compiler-rt/lib/builtins(//llvm/utils/gn/build/toolchain:stage2_ios_aarch64 )" ]
31+ deps += [ " //compiler-rt/lib/builtins(//llvm/utils/gn/build/toolchain:stage2_ios_arm64e )" ]
3232 }
3333 if (llvm_build_X86 ) {
3434 deps += [ " //compiler-rt/lib/builtins(//llvm/utils/gn/build/toolchain:stage2_iossim_x64)" ]
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ static_library("builtins") {
5454 output_dir = crt_current_out_dir
5555 if (current_os == " mac" ) {
5656 output_name = " clang_rt.osx"
57- } else if (current_os == " ios" && current_cpu == " arm64 " ) {
57+ } else if (current_os == " ios" && current_cpu == " arm64e " ) {
5858 output_name = " clang_rt.ios"
5959 } else if (current_os == " ios" && current_cpu == " x64" ) {
6060 output_name = " clang_rt.iossim"
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ if (current_cpu == "x86") {
1313 crt_current_target_arch = " arm"
1414} else if (current_cpu == " arm64" ) {
1515 crt_current_target_arch = " aarch64"
16+ } else if (current_cpu == " arm64e" ) {
17+ crt_current_target_arch = " arm64e"
1618} else if (current_cpu == " ppc64" ) {
1719 crt_current_target_arch = " powerpc64le"
1820} else {
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ if (current_cpu == "x86") {
3636 if (current_os == " linux" ) {
3737 llvm_current_triple = " powerpc64le-unknown-linux-gnu"
3838 }
39+ } else if (current_cpu == " arm64e" ) {
40+ if (current_os == " ios" || current_os == " mac" ) {
41+ llvm_current_triple = " arm64e-apple-darwin"
42+ }
3943}
4044
4145if (! defined (llvm_current_triple )) {
You can’t perform that action at this time.
0 commit comments