write_to_bazelrc('build --define grpc_no_ares=true')
+def set_build_strip_flag():
+ write_to_bazelrc('build --strip=always')
+
+
def set_windows_build_flags():
if is_windows():
# The non-monolithic build is not supported yet
set_grpc_build_flags()
set_cc_opt_flags(environ_cp)
+ set_build_strip_flag()
set_windows_build_flags()
if workspace_has_any_android_rule():
# excludes all but a subset of function names.
# On MacOS, the linker does not support version_script, but has an
# an "-exported_symbols_list" command. -z defs disallows undefined
-# symbols in object files and -s strips the output.
+# symbols in object files.
tf_cc_shared_object(
name = "libtensorflow.so",
"//tensorflow:windows_msvc": [],
"//conditions:default": [
"-z defs",
- "-s",
"-Wl,--version-script", # This line must be directly followed by the version_script.lds file
"$(location //tensorflow/c:version_script.lds)",
],
"//tensorflow:windows_msvc": [],
"//conditions:default": [
"-z defs",
- "-s",
"-Wl,--version-script", # This line must be directly followed by the version_script.lds file
"$(location //tensorflow:tf_version_script.lds)",
],