[PATCH] D47217: [cmake] [ARM] Check if VFP is supported before including any VFP builtins

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 03:59:36 PDT 2018


peter.smith added a comment.

I think that this is a sensible thing to do and it also helps out when trying to build compiler-rt for armv7-m as compiler-rt currently assumes that you have a target with a VFP when many armv7-m devices do not.



================
Comment at: lib/builtins/CMakeLists.txt:400
+# arm_Thumb1_VFPv2_SOURCES in arm_Thumb1_SOURCES.
+if(NOT COMPILER_RT_HAS_ARM_VFP)
+  set(arm_Thumb1_SOURCES
----------------
Would it be worth reordering so that we don't stat the test with a NOT. For example:

```
if (COMPILER_RT_HAS_ARM_VFP)
  set(arm_Thumb1_SOURCES
    ${arm_Thumb1_JT_SOURCES}
    ${arm_Thumb1_SjLj_EH_SOURCES}
    ${arm_Thumb1_VFPv2_SOURCES}
    ${arm_Thumb1_icache_SOURCES})
else()
  set(arm_Thumb1_SOURCES
  ${arm_Thumb1_JT_SOURCES}
  ${arm_Thumb1_icache_SOURCES})
endif()
```


Repository:
  rL LLVM

https://reviews.llvm.org/D47217





More information about the llvm-commits mailing list