diff --git a/oss_scripts/configure.sh b/oss_scripts/configure.sh index 01d271b6d..58bceae9e 100755 --- a/oss_scripts/configure.sh +++ b/oss_scripts/configure.sh @@ -28,6 +28,11 @@ else pip install tensorflow==1.14.0 fi +osname="$(uname -s)" +if [[ $osname == "Linux" ]]; then + write_to_bazelrc "build --cxxopt='-std=c++11'" +fi + TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') ) TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))') ) TF_LFLAGS2=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))' | awk '{print $2}') ) diff --git a/tensorflow_text/BUILD b/tensorflow_text/BUILD index 771881253..28b3f9a5e 100644 --- a/tensorflow_text/BUILD +++ b/tensorflow_text/BUILD @@ -39,7 +39,6 @@ cc_binary( ], copts = [ "-pthread", - "-std=c++11", ], linkshared = 1, deps = [ @@ -118,7 +117,6 @@ cc_binary( ], copts = [ "-pthread", - "-std=c++11", ], linkshared = 1, deps = [ @@ -234,7 +232,6 @@ cc_binary( ], copts = [ "-pthread", - "-std=c++11", ], linkshared = 1, deps = [ @@ -338,7 +335,6 @@ cc_binary( ], copts = [ "-pthread", - "-std=c++11", ], linkshared = 1, deps = [ @@ -417,7 +413,6 @@ cc_binary( ], copts = [ "-pthread", - "-std=c++11", ], linkshared = 1, deps = [ @@ -461,7 +456,6 @@ cc_binary( ], copts = [ "-pthread", - "-std=c++11", ], linkshared = 1, deps = [ diff --git a/third_party/icu/data/BUILD b/third_party/icu/data/BUILD index 0459ac516..8611eb681 100644 --- a/third_party/icu/data/BUILD +++ b/third_party/icu/data/BUILD @@ -28,6 +28,5 @@ exports_files(["LICENSE"]) cc_library( name = "icu_normalization_data", srcs = ["normalization_data.c"], - copts = ["-std=c++11"], deps = ["@icu//:headers"], )