[PATCH] D16428: [CMake] Provide options for toggling on and off various runtime libraries.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 14:33:43 PST 2016


samsonov added inline comments.

================
Comment at: cmake/config-ix.cmake:630
@@ +629,3 @@
+endif()
+
+set(COMPILER_RT_RUNTIMES_TO_BUILD "all"
----------------
I think you should do the same for "stats" library. It's not a part of sanitizer_common, it uses sanitizer_common. So, this
should be smth. like

```
if (OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows")
  list(APPEND DEFAULT_RUNTIMES stats)
  list(APPEND REQUIRES_COMMON stats)
endif()
```

and remove adding `stats` below from "SHOULD_BUILD_COMMON".

================
Comment at: cmake/config-ix.cmake:646
@@ +645,3 @@
+  append_list_unique(COMPILER_RT_RUNTIMES_TO_BUILD lsan)
+  append_list_unique(COMPILER_RT_RUNTIMES_TO_BUILD ubsan)
+  append_list_unique(COMPILER_RT_RUNTIMES_TO_BUILD stats)
----------------
I don't fully understand how it works: you seem to add "ubsan" to COMPILER_RT_RUNTIMES_TO_BUILD always if you need sanitizer_common, which will lead to `COMPILER_RT_HAS_UBSAN` being true in that case. That's not true: e.g. if UBSAN_SUPPORTED_ARCH is empty you don't need to create UBSan runtime, or execute UBSan tests.


http://reviews.llvm.org/D16428





More information about the llvm-commits mailing list