From 58d751155a9bf4dbf4d922fcbc76fde0cc4c53e6 Mon Sep 17 00:00:00 2001 From: Richard Howell Date: Wed, 22 Jun 2022 22:21:03 +0000 Subject: [PATCH] [caffe] remove some unnecessary exported_preprocessor_flags (#80063) Summary: Move caffe2 compiler flags out of exported_preprocessor_flags, these should only contain defines and includes. Test Plan: Flags before: P510631359 Flags after: P510631375 Removed compiler flags are not present in exported preprocessor flags any more and exported preprocessor flags are not duplicated in compiler flags: {F745125320} Reviewed By: smeenai Differential Revision: D37288331 Pull Request resolved: https://github.com/pytorch/pytorch/pull/80063 Approved by: https://github.com/mehtanirav --- c2_defs.bzl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/c2_defs.bzl b/c2_defs.bzl index 01ec0c6d164..d77fed977f3 100644 --- a/c2_defs.bzl +++ b/c2_defs.bzl @@ -93,12 +93,6 @@ def get_c2_tvm(): return bool(int(c2_tvm)) _C2_XPLAT_NO_HPTT_PREPROCESSOR_FLAGS = [ - "-fexceptions", - "-frtti", - "-Wno-shadow", - "-Wno-unknown-pragmas", - "-Wno-unused-variable", - "-Wno-sign-compare", "-Icaffe2", "-Imodules", "-DEIGEN_NO_DEBUG", @@ -139,7 +133,13 @@ def get_c2_xplat_preprocessor_flags(): def get_c2_xplat_no_hptt_compiler_flags(): return [ "-Os", - ] + get_c2_xplat_no_hptt_preprocessor_flags() + "-fexceptions", + "-frtti", + "-Wno-shadow", + "-Wno-unknown-pragmas", + "-Wno-unused-variable", + "-Wno-sign-compare", + ] def get_c2_xplat_compiler_flags(): return get_c2_xplat_no_hptt_compiler_flags() + C2_XPLAT_HPTT_PREPROCESSOR_FLAGS