diff --git a/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl b/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl index 082ed950b04..eb320a94201 100644 --- a/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl +++ b/third_party/gpus/crosstool/cc_toolchain_config.bzl.tpl @@ -583,7 +583,11 @@ def _features(cpu, compiler, ctx): ), ], ), - feature(name = "opt"), + feature(name = "disable-assertions"), + feature( + name = "opt", + implies = ["disable-assertions"], + ), feature(name = "fastbuild"), feature(name = "dbg"), feature(name = "supports_dynamic_linker", enabled = True),