MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / set_windows_build_flags

Function set_windows_build_flags

configure.py:1264–1291  ·  view source on GitHub ↗

Set Windows specific build options.

(environ_cp)

Source from the content-addressed store, hash-verified

1262
1263
1264def set_windows_build_flags(environ_cp):
1265 """Set Windows specific build options."""
1266 # The non-monolithic build is not supported yet
1267 write_to_bazelrc('build --config monolithic')
1268 # Suppress warning messages
1269 write_to_bazelrc('build --copt=-w --host_copt=-w')
1270 # Fix winsock2.h conflicts
1271 write_to_bazelrc(
1272 'build --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN '
1273 '--copt=-DNOGDI --host_copt=-DNOGDI')
1274 # Output more verbose information when something goes wrong
1275 write_to_bazelrc('build --verbose_failures')
1276 # The host and target platforms are the same in Windows build. So we don't
1277 # have to distinct them. This avoids building the same targets twice.
1278 write_to_bazelrc('build --distinct_host_configuration=false')
1279
1280 if get_var(
1281 environ_cp, 'TF_OVERRIDE_EIGEN_STRONG_INLINE', 'Eigen strong inline',
1282 True, ('Would you like to override eigen strong inline for some C++ '
1283 'compilation to reduce the compilation time?'),
1284 'Eigen strong inline overridden.', 'Not overriding eigen strong inline, '
1285 'some compilations could take more than 20 mins.'):
1286 # Due to a known MSVC compiler issue
1287 # https://github.com/tensorflow/tensorflow/issues/10521
1288 # Overriding eigen strong inline speeds up the compiling of
1289 # conv_grad_ops_3d.cc and conv_ops_3d.cc by 20 minutes,
1290 # but this also hurts the performance. Let users decide what they want.
1291 write_to_bazelrc('build --define=override_eigen_strong_inline=true')
1292
1293
1294def config_info_line(name, help_text):

Callers 1

mainFunction · 0.85

Calls 2

write_to_bazelrcFunction · 0.85
get_varFunction · 0.70

Tested by

no test coverage detected