diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index 13af2ce042ffe..ecf2db32ec5a5 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -147,7 +147,7 @@ function( add_common_options LIB_NAME) endif() endfunction(add_common_options) -if (LLVM_ENABLE_ASSERTIONS AND NOT SYCL_DISABLE_STL_ASSERTIONS) +if (LLVM_ENABLE_ASSERTIONS AND NOT SYCL_DISABLE_STL_ASSERTIONS AND NOT WIN32) if(SYCL_USE_LIBCXX) add_definitions(-D_LIBCPP_DEBUG=1) set(SYCL_CLANG_EXTRA_FLAGS "${SYCL_CLANG_EXTRA_FLAGS} -D_LIBCPP_DEBUG=1") diff --git a/sycl/test/lit.cfg.py b/sycl/test/lit.cfg.py index 70b09741b2df5..e2134956e9ceb 100644 --- a/sycl/test/lit.cfg.py +++ b/sycl/test/lit.cfg.py @@ -35,7 +35,7 @@ # test_exec_root: The root path where tests should be run. config.test_exec_root = os.path.join(config.sycl_obj_root, 'test') -llvm_config.use_clang() +llvm_config.use_clang(additional_flags=config.sycl_clang_extra_flags.split(' ')) # Propagate some variables from the host environment. llvm_config.with_system_environment(['PATH', 'OCL_ICD_FILENAMES', 'SYCL_DEVICE_ALLOWLIST', 'SYCL_CONFIG_FILE_NAME']) @@ -62,8 +62,6 @@ config.available_features.add('libcxx') llvm_config.with_system_environment('LD_LIBRARY_PATH') llvm_config.with_environment('LD_LIBRARY_PATH', config.sycl_libs_dir, append_path=True) - llvm_config.with_system_environment('CFLAGS') - llvm_config.with_environment('CFLAGS', config.sycl_clang_extra_flags) elif platform.system() == "Windows": config.available_features.add('windows') diff --git a/sycl/test/on-device/lit.cfg.py b/sycl/test/on-device/lit.cfg.py index 78a14ff78f846..f42d713ea57eb 100644 --- a/sycl/test/on-device/lit.cfg.py +++ b/sycl/test/on-device/lit.cfg.py @@ -35,7 +35,8 @@ # test_exec_root: The root path where tests should be run. config.test_exec_root = os.path.join(config.sycl_obj_root, 'test') -llvm_config.use_clang(use_installed=True) +llvm_config.use_clang(use_installed=True, + additional_flags=config.sycl_clang_extra_flags.split(' ')) # Propagate some variables from the host environment. llvm_config.with_system_environment(['PATH', 'OCL_ICD_FILENAMES', 'SYCL_DEVICE_ALLOWLIST', 'SYCL_CONFIG_FILE_NAME']) @@ -57,8 +58,6 @@ config.available_features.add('linux') llvm_config.with_system_environment(['LD_LIBRARY_PATH','LIBRARY_PATH','CPATH']) llvm_config.with_environment('LD_LIBRARY_PATH', config.sycl_libs_dir, append_path=True) - llvm_config.with_system_environment('CFLAGS') - llvm_config.with_environment('CFLAGS', config.sycl_clang_extra_flags) elif platform.system() == "Windows": config.available_features.add('windows')