Merge pull request #46542 from tensorflow/cp_351470659

[CherryPick:r2.4] Pass cc_opt_flags to host_copt.
This commit is contained in:
Mihai Maruseac 2021-01-19 13:49:16 -08:00 committed by GitHub
commit 5c849f2550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -539,6 +539,7 @@ def set_cc_opt_flags(environ_cp):
question, default_cc_opt_flags)
for opt in cc_opt_flags.split():
write_to_bazelrc('build:opt --copt=%s' % opt)
write_to_bazelrc('build:opt --host_copt=%s' % opt)
write_to_bazelrc('build:opt --define with_default_optimizations=true')