Pass cc_opt_flags to host_copt.

For GPU builds, the host compiler should get these compile flags as well.

PiperOrigin-RevId: 351470659
Change-Id: I8610ac871e370895f9234e3f047e7ee90557db86
This commit is contained in:
A. Unique TensorFlower 2021-01-12 16:15:11 -08:00 committed by TensorFlower Gardener
parent 3fc7a34c77
commit 7e67fdc00c

View File

@ -538,6 +538,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')