[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
This commit is contained in:
Jordan Zhu
2025-04-28 16:04:28 +00:00
committed by PyTorch MergeBot
parent 9c864f9b0f
commit 4bdecd94ea

View File

@ -45,7 +45,7 @@ default_compiler_flags = [
# includes <pthread.h> - a header not available on Windows. # includes <pthread.h> - a header not available on Windows.
"DEFAULT": ["-DUSE_XNNPACK"], "DEFAULT": ["-DUSE_XNNPACK"],
"ovr_config//os:windows": [], "ovr_config//os:windows": [],
}) + (["-O1"] if native.read_config("fbcode", "build_mode_test_label", "") == "dev-nosan" else []) })
compiler_specific_flags = { compiler_specific_flags = {
"clang": [ "clang": [