swig deprecation - preset copt and features values in tf_python_pybind_extension macro as they will be the same across all pybind11 wrappers.

PiperOrigin-RevId: 267193818
This commit is contained in:
Hye Soo Yang 2019-09-04 11:25:15 -07:00 committed by TensorFlower Gardener
parent daea9fbc16
commit a9a9d8e545
2 changed files with 6 additions and 23 deletions

View File

@ -385,11 +385,6 @@ tf_python_pybind_extension(
name = "_pywrap_utils",
srcs = ["util/util_wrapper.cc"],
hdrs = ["util/util.h"],
copts = [
"-fexceptions",
"-fno-strict-aliasing",
],
features = ["-use_header_modules"],
module_name = "_pywrap_utils",
deps = [
"//third_party/python_runtime:headers",
@ -400,11 +395,6 @@ tf_python_pybind_extension(
tf_python_pybind_extension(
name = "_pywrap_stat_summarizer",
srcs = ["util/stat_summarizer_wrapper.cc"],
copts = [
"-fexceptions",
"-fno-strict-aliasing",
],
features = ["-use_header_modules"],
module_name = "_pywrap_stat_summarizer",
deps = [
"//tensorflow/core:framework",
@ -419,11 +409,6 @@ pybind_extension(
name = "_pywrap_util_port",
srcs = ["util/port_wrapper.cc"],
hdrs = ["//tensorflow/core:util_port_hdrs"],
copts = [
"-fexceptions",
"-fno-strict-aliasing",
],
features = ["-use_header_modules"],
module_name = "_pywrap_util_port",
deps = [
"//tensorflow/core:util_port",
@ -4663,8 +4648,6 @@ py_library(
pybind_extension(
name = "_tf_stack",
srcs = ["util/tf_stack.cc"],
copts = ["-fexceptions"],
features = ["-use_header_modules"],
# TODO(b/138203821): change to "util._tf_stack" once the bug is fixed.
module_name = "_tf_stack",
deps = [

View File

@ -2391,7 +2391,7 @@ def pybind_extension(
features = [],
srcs_version = "PY2AND3",
data = [],
copts = None,
copts = [],
linkopts = [],
deps = [],
visibility = None,
@ -2437,7 +2437,7 @@ def pybind_extension(
name = so_file,
srcs = srcs + hdrs,
data = data,
copts = copts,
copts = copts + ["-fexceptions"],
linkopts = linkopts + _rpath_linkopts(name) + select({
"@local_config_cuda//cuda:darwin": [
"-Wl,-exported_symbols_list,$(location %s)" % exported_symbols_file,
@ -2452,7 +2452,7 @@ def pybind_extension(
exported_symbols_file,
version_script_file,
],
features = features,
features = features + ["-use_header_modules"],
linkshared = 1,
testonly = testonly,
licenses = licenses,
@ -2493,9 +2493,9 @@ def tf_python_pybind_extension(
name,
srcs,
module_name,
hdrs = [],
features = [],
copts = None,
copts = [],
hdrs = [],
deps = []):
"""A wrapper macro for pybind_extension that is used in tensorflow/python/BUILD.
@ -2506,9 +2506,9 @@ def tf_python_pybind_extension(
name,
srcs + tf_binary_additional_srcs(),
module_name,
hdrs = hdrs,
features = features,
copts = copts,
hdrs = hdrs,
deps = deps + tf_binary_pybind_deps(),
)