From 4bdecd94ea50f4a105fe82d471d12f57629d8f52 Mon Sep 17 00:00:00 2001 From: Jordan Zhu Date: Mon, 28 Apr 2025 16:04:28 +0000 Subject: [PATCH] [modefile free][long tail] selectify fbcode/caffe2/defs.bzl (#148925) Summary: replace read_config with select For more info, please refer to the [doc](https://docs.google.com/document/d/1e0Hvht8WEHhcRvlCAodq_R9xnAtKBrAhdyvxcAqQjCw/edit?tab=t.hl8j18gza0cv) Test Plan: CI Reviewed By: malfet Differential Revision: D70267850 Pull Request resolved: https://github.com/pytorch/pytorch/pull/148925 Approved by: https://github.com/malfet --- defs.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defs.bzl b/defs.bzl index 22f508bf6449..76da984725a9 100644 --- a/defs.bzl +++ b/defs.bzl @@ -45,7 +45,7 @@ default_compiler_flags = [ # includes - a header not available on Windows. "DEFAULT": ["-DUSE_XNNPACK"], "ovr_config//os:windows": [], -}) + (["-O1"] if native.read_config("fbcode", "build_mode_test_label", "") == "dev-nosan" else []) +}) compiler_specific_flags = { "clang": [