diff --git a/.github/workflows/bazel-gcc-c++23-no-stl.yml b/.github/workflows/bazel-gcc-c++23-no-stl.yml index 648e0bcb..1521793d 100644 --- a/.github/workflows/bazel-gcc-c++23-no-stl.yml +++ b/.github/workflows/bazel-gcc-c++23-no-stl.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@v6.0.3 - name: Build - run: bazel build //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL + run: bazel build //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --//:etl_profile=//:no_profile - name: Run tests - run: bazel test //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --test_output=all + run: bazel test //test:etl_tests --cxxopt=-std=c++23 --copt=-DETL_NO_STL --//:etl_profile=//:no_profile --test_output=all diff --git a/BUILD.bazel b/BUILD.bazel index 59ea5184..83d337ac 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -20,14 +20,23 @@ package(default_visibility = ["//visibility:public"]) # strip_include_prefix = ".", # ) # -# The default is empty, so ETL's built-in defaults are used unless overridden. +# The default of this label_flag is incompatible. This makes sure that the consumer +# explicitly sets a profile, even if it is the `no_profile` defined below. + label_flag( name = "etl_profile", - build_setting_default = ":no_profile", + build_setting_default = ":incompatible_profile", ) cc_library(name = "no_profile") +cc_library( + name = "incompatible_profile", + target_compatible_with = [ + "@platforms//:incompatible", + ], +) + cc_library( name = "etl", hdrs = glob(["include/**/*.h"]),