Skip to content

Commit

Permalink
[better_engineering][multiplatform] Repalce host_info() check with se…
Browse files Browse the repository at this point in the history
…lect for default_compiler_flags (pytorch#98306)

Summary: Same as title

Test Plan: CI

Differential Revision: D44667769

Pull Request resolved: pytorch#98306
Approved by: https://github.com/priyaramani, https://github.com/malfet
  • Loading branch information
kkolur76 authored and pytorchmergebot committed Apr 7, 2023
1 parent 390c51b commit 79e14f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ default_compiler_flags = [
# nvrtc library which we load canonically anyway
"-DUSE_DIRECT_NVRTC",
"-DUSE_RUY_QMATMUL",
] + ([] if native.host_info().os.is_windows else [
] + select({
# XNNPACK depends on an updated version of pthreadpool interface, whose implementation
# includes <pthread.h> - a header not available on Windows.
"-DUSE_XNNPACK",
]) + (["-O1"] if native.read_config("fbcode", "build_mode_test_label", "") == "dev-nosan" else [])
"DEFAULT": ["-DUSE_XNNPACK"],
"ovr_config//os:windows": [],
}) + (["-O1"] if native.read_config("fbcode", "build_mode_test_label", "") == "dev-nosan" else [])

compiler_specific_flags = {
"clang": [
Expand Down

0 comments on commit 79e14f8

Please sign in to comment.