Skip to content

Commit fa5e54d

Browse files
authored
[SYCL][E2E] Add O0 feature detection for lit tests (#21895)
Add feature detection for unoptimized builds in lit test configuration. Tests can now use REQUIRES: O0 to conditionally run when building with -O0 (Linux/Clang) or /Od (Windows/MSVC) flags. For XFAILs like: #21141
1 parent db88c21 commit fa5e54d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sycl/test-e2e/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,10 @@ def get_sycl_ls_verbose(sycl_device, env):
995995
config.available_features.add("new-offload-model")
996996
config.cxx_flags += " --offload-new-driver "
997997

998+
# Add O0 feature for unoptimized builds
999+
if re.search(r"(^|\s)(-O0|/Od)(\s|$)", config.cxx_flags):
1000+
config.available_features.add("O0")
1001+
9981002
# That has to be executed last so that all device-independent features have been
9991003
# discovered already.
10001004
config.sycl_dev_features = {}

0 commit comments

Comments
 (0)