diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt index e69ceebabe0d..426dc7e46eaa 100644 --- a/llvm/test/CMakeLists.txt +++ b/llvm/test/CMakeLists.txt @@ -12,6 +12,7 @@ llvm_canonicalize_cmake_booleans( LLVM_LINK_LLVM_DYLIB LLVM_TOOL_LTO_BUILD LLVM_USE_INTEL_JITEVENTS + LLVM_BUILD_EXAMPLES ) configure_lit_site_cfg( diff --git a/llvm/test/Examples/lit.local.cfg b/llvm/test/Examples/lit.local.cfg index 462e3dc5d11d..69bc11ee6b95 100644 --- a/llvm/test/Examples/lit.local.cfg +++ b/llvm/test/Examples/lit.local.cfg @@ -1 +1,2 @@ -config.unsupported = True +if not config.build_examples: + config.unsupported = True \ No newline at end of file diff --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in index 62c90b7c66b8..ada27ff6a774 100644 --- a/llvm/test/lit.site.cfg.py.in +++ b/llvm/test/lit.site.cfg.py.in @@ -36,6 +36,7 @@ config.have_zlib = @HAVE_LIBZ@ config.have_libxar = @HAVE_LIBXAR@ config.have_dia_sdk = @LLVM_ENABLE_DIA_SDK@ config.enable_ffi = @LLVM_ENABLE_FFI@ +config.build_examples = @LLVM_BUILD_EXAMPLES@ config.enable_threads = @LLVM_ENABLE_THREADS@ config.build_shared_libs = @BUILD_SHARED_LIBS@ config.link_llvm_dylib = @LLVM_LINK_LLVM_DYLIB@