summaryrefslogtreecommitdiffstats
path: root/Source/cmELF.h
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2022-10-03 20:21:11 (GMT)
committerEvan Wilde <etceterawilde@gmail.com>2022-10-11 18:55:45 (GMT)
commit6063428de7707f68b14d74d93d5440c61cc50cf4 (patch)
tree69e5a6a8dc97d76db844546396456ab9fca092c0 /Source/cmELF.h
parent7629a1182cf9006e4e83c1094794d935503dd079 (diff)
downloadCMake-6063428de7707f68b14d74d93d5440c61cc50cf4.zip
CMake-6063428de7707f68b14d74d93d5440c61cc50cf4.tar.gz
CMake-6063428de7707f68b14d74d93d5440c61cc50cf4.tar.bz2
Swift: Update default build flags
Fully-optimized builds should be using whole-module optimizations(WMO) to get all the optimizations the compiler can do for a given module. As such, it makes sense for the release builds to pass `-whole-module-optimization` or `-wmo` to the compiler by default. `-whole-module-optimization` and `-wmo` are aliased and have the same impact on the build. Removing `-incrementa' from the `CMAKE_Swift_CREATE_*` variable: WMO is incompatible with incremental builds, so it is removed to avoid warnings from the Swift compiler. Pass `-num-threads` to the driver in `CMAKE_Swift_CREATE_*`: WMO doesn't use the `-j` flag, but instead uses `-num-threads` to get parallelism. The two flags are applied in mutually exclusive contexts, so `-j N` is a no-op in WMO, while `-num-threads` is a no-op in other modes. Passing both at the same time will catch both cases without negatively impacting the other case.
Diffstat (limited to 'Source/cmELF.h')
0 files changed, 0 insertions, 0 deletions