@@ -300,19 +300,22 @@ if(FUCHSIA_SDK)
300
300
set (LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS "aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "" )
301
301
endif ()
302
302
303
- foreach (target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi;armv8.1m.main-none-eabi )
303
+ foreach (target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi;armv8.1m.main-none-eabi;aarch64-none-elf )
304
304
list (APPEND BUILTIN_TARGETS "${target} " )
305
305
set (BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "" )
306
306
set (BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "" )
307
307
set (BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "" )
308
308
set (BUILTINS_${target}_CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "" )
309
309
foreach (lang C;CXX;ASM )
310
- set (BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb" )
310
+ set (BUILTINS_${target}_CMAKE_${lang}_local_flags "--target=${target} " )
311
+ if (NOT ${target} STREQUAL "aarch64-none-elf" )
312
+ set (BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target} _CMAKE_${lang} _local_flags} -mthumb" )
313
+ endif ()
311
314
if (${target} STREQUAL "armv8m.main-none-eabi" )
312
- set (BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "" )
315
+ set (BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" )
313
316
endif ()
314
317
if (${target} STREQUAL "armv8.1m.main-none-eabi" )
315
- set (BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55" CACHE STRING "" )
318
+ set (BUILTINS_${target}_CMAKE_${lang}_local_flags "${BUILTINS_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55" )
316
319
endif ()
317
320
set (BUILTINS_${target}_CMAKE_${lang}_FLAGS "${BUILTINS_${target} _CMAKE_${lang} _local_flags}" CACHE STRING "" )
318
321
endforeach ()
@@ -330,12 +333,15 @@ foreach(target armv6m-none-eabi;armv7m-none-eabi;armv8m.main-none-eabi;armv8.1m.
330
333
foreach (lang C;CXX;ASM )
331
334
# TODO: The preprocessor defines workaround various issues in libc and libc++ integration.
332
335
# These should be addressed and removed over time.
333
- set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -mthumb -Wno-atomic-alignment \" -Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \" -Dfprintf(stream, format, ...)=printf(format)\" \" -Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1" )
336
+ set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "--target=${target} -Wno-atomic-alignment \" -Dvfprintf(stream, format, vlist)=vprintf(format, vlist)\" \" -Dfprintf(stream, format, ...)=printf(format)\" \" -Dgettimeofday(tv, tz)\" -D_LIBCPP_PRINT=1" )
337
+ if (NOT ${target} STREQUAL "aarch64-none-elf" )
338
+ set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target} _CMAKE_${lang} _local_flags} -mthumb" )
339
+ endif ()
334
340
if (${target} STREQUAL "armv8m.main-none-eabi" )
335
- set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" CACHE STRING "" )
341
+ set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=softfp -march=armv8m.main+fp+dsp -mcpu=cortex-m33" )
336
342
endif ()
337
343
if (${target} STREQUAL "armv8.1m.main-none-eabi" )
338
- set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55" CACHE STRING "" )
344
+ set (RUNTIMES_${target}_CMAKE_${lang}_local_flags "${RUNTIMES_${target} _CMAKE_${lang} _local_flags} -mfloat-abi=hard -march=armv8.1-m.main+mve.fp+fp.dp -mcpu=cortex-m55" )
339
345
endif ()
340
346
set (RUNTIMES_${target}_CMAKE_${lang}_FLAGS "${RUNTIMES_${target} _CMAKE_${lang} _local_flags}" CACHE STRING "" )
341
347
endforeach ()
0 commit comments