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 @@ -261,6 +261,13 @@ if (host_os == "mac") {
261261 }
262262 }
263263
264+ stage2_unix_toolchain (" stage2_ios_arm64e" ) {
265+ toolchain_args = {
266+ current_os = " ios"
267+ current_cpu = " arm64e"
268+ }
269+ }
270+
264271 stage2_unix_toolchain (" stage2_iossim_x64" ) {
265272 toolchain_args = {
266273 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 @@ -63,7 +63,7 @@ static_library("builtins") {
6363 output_dir = crt_current_out_dir
6464 if (current_os == " mac" ) {
6565 output_name = " clang_rt.osx"
66- } else if (current_os == " ios" && current_cpu == " arm64 " ) {
66+ } else if (current_os == " ios" && current_cpu == " arm64e " ) {
6767 output_name = " clang_rt.ios"
6868 } else if (current_os == " ios" && current_cpu == " x64" ) {
6969 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