From f20e0036bd6fa0731e12a7814f94d966ada17746 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Wed, 22 Dec 2021 18:51:52 +0330 Subject: [PATCH] Meta: Add a cmake flag for building for compiler explorer We don't need to build tests/binaries for CE. --- Documentation/AdvancedBuildInstructions.md | 1 + Meta/Lagom/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/AdvancedBuildInstructions.md b/Documentation/AdvancedBuildInstructions.md index e5bf99a48b7..10c27cf4b7b 100644 --- a/Documentation/AdvancedBuildInstructions.md +++ b/Documentation/AdvancedBuildInstructions.md @@ -44,6 +44,7 @@ There are some optional features that can be enabled during compilation that are - `ENABLE_KERNEL_COVERAGE_COLLECTION`: enables the KCOV API and kernel coverage collection instrumentation. Only useful for coverage guided kernel fuzzing. - `ENABLE_MEMORY_SANITIZER`: enables runtime checks for uninitialized memory accesses in Lagom test cases. - `ENABLE_UNDEFINED_SANITIZER`: builds in runtime checks for [undefined behavior](https://en.wikipedia.org/wiki/Undefined_behavior) (like null pointer dereferences and signed integer overflows) in Lagom test cases. +- `ENABLE_COMPILER_EXPLORER_BUILD`: Skip building non-library entities in Lagom (this only applies to Lagom). - `ENABLE_FUZZER_SANITIZER`: builds [fuzzers](https://en.wikipedia.org/wiki/Fuzzing) for various parts of the system. - `ENABLE_EXTRA_KERNEL_DEBUG_SYMBOLS`: sets -Og and -ggdb3 compile options for building the Kernel. Allows for easier debugging of Kernel code. By default, the Kernel is built with -O2 instead. - `ENABLE_ALL_THE_DEBUG_MACROS`: used for checking whether debug code compiles on CI. This should not be set normally, as it clutters the console output and makes the system run very slowly. Instead, enable only the needed debug macros, as described below. diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 6fe3516a013..fd3b54cb361 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -441,7 +441,7 @@ if (BUILD_LAGOM) SOURCES ${LIBX86_SOURCES} ) - if (NOT ENABLE_OSS_FUZZ AND NOT ENABLE_FUZZER_SANITIZER) + if (NOT ENABLE_OSS_FUZZ AND NOT ENABLE_FUZZER_SANITIZER AND NOT ENABLE_COMPILER_EXPLORER_BUILD) # Lagom Examples add_executable(TestApp TestApp.cpp) target_link_libraries(TestApp LagomCore)