aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp/wrapper/bin
Commit message (Collapse)AuthorAge
* msvc_cl.py: Remove code for adding /MT /MD options from wrapper script.Gravatar pcloudy2017-11-14
| | | | | | | | The wrapper script is now only necessary for TensorFlow GPU build. Since the link option for MSVCRT is controlled by CROSSTOOL, we should remove the hack in wrapper script to avoid conflict. RELNOTES: None PiperOrigin-RevId: 175664202
* Fix include check on WindowsGravatar Yun Peng2017-06-26
| | | | | | | | | | | Don't add $TMP as cxx_builtin_include_directory, instead use $TMP/nvcc_inter_files_tmp_dir as tmp direcotry for nvcc.exe Fixed https://github.com/bazelbuild/bazel/issues/3202 RELNOTES: None. PiperOrigin-RevId: 160109290
* Use a wrapper-free MSVC toolchain when NO_MSVC_WRAPPER=1Gravatar Yun Peng2017-06-06
| | | | | | | | | | | | | | | | | | | To enable a wrapper free MSVC CROSSTOOL, set NO_MSVC_WRAPPER=1 or add --action_env=NO_MSVC_WRAPPER=1 flag. Note that we still use windows_cc_wrapper.bat to invoke cl.exe and link.exe for different actions. Result for bazel build src/main/cpp:client : NO_WRAPPER: INFO: Elapsed time: 76.833s, Critical Path: 16.70s WRAPPER: INFO: Elapsed time: 138.517s, Critical Path: 27.78s Change-Id: Iaf6b67fc791ae1f8b62d332e47f96f719510bda1 PiperOrigin-RevId: 158118110
* Let MSVC wrapper recongnize -DEFAULTLIB:library optionGravatar Yun Peng2017-05-26
| | | | | | | | | | | | | If MSVC wrapper is removed, users cannot put flags like `-Wl,ws2_32.lib` in linkopts of C++ rules on Windows. Instead, they should do `-DEFAULTLIB:ws2_32.lib`. This change is to make the wrapper script also accpet -DEFAULTLIB:library option. https://msdn.microsoft.com/en-us/library/229a6ysd.aspx Change-Id: I0cf9f5529f833470166488100b70fb497384e083 PiperOrigin-RevId: 156978364
* Fix msvc_cl.py for cuda compilationGravatar Yun Peng2017-05-24
| | | | | | | Passing /MT or /MD option using --compiler_options to nvcc Change-Id: Idf02ca0a4abf25bced397f5fffc1bc10ff0c160f PiperOrigin-RevId: 156976225
* Parse /showIncludes output for MSVC compilerGravatar Yun Peng2017-04-25
| | | | | | | | Instead of parsing .d file generated by wrapper script, we directly parse the output of /showIncludes option. Change-Id: Id94e20a5cb05a494a793fd6a43756d44d27cea8a PiperOrigin-RevId: 154161939
* Clean up more things in MSVC wrapper scriptsGravatar Yun Peng2017-04-24
| | | | | | | | | | | 1. Moved /nologo flag into feature 2. No need to specify -m64, adding /MACHINVE:X64 as linker flag 3. Still use wrapper script to add /MT or /MD for now, because our users are depending on it: https://github.com/bazelbuild/bazel/issues/2120 We need a plan first before move them into CROSSTOOL Change-Id: If5e4c01a900fcf9e93877e04a893879897bff3a3 PiperOrigin-RevId: 154036870
* MSVC: attempt to choose msvcrt.lib vs libcmt.lib correctlyGravatar Steven Johnson2017-04-24
| | | | | | | | | See Issue #2120: if we specify /MD for copts, we should attempt to use MSVCRTx.lib instead of LIBCMTx.lib. Closes #2862. PiperOrigin-RevId: 154032031
* Generating PDB files on WindowsGravatar Yun Peng2017-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add /Z7 as compiler flag in CROSSTOOL, this causes full debugging infomation built into object files, no PDB file is generated. 2. Add /DEBUG as linker flag so that a PDB file will be generated for executable or dll. * /DEBUG:FULL for dbg mode. the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed. * /DEBUG:FASTLINK for fastbuild mode. object files are still needed when debugging the executable, but linking speed can be two to four times faster that full PDB generation. * No option is added for opt mode. More detailed info: https://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx 3. Add an empty feature in MSVC CROSSTOOL to tell Bazel we need PDB file 4. Add PDB file artifact in an output named pdb_file of cc_binary, then you can build the pdb file by bazel build //foo/bar:bin --output_groups=pdb_file 5. Add test for PDB file generation Change-Id: Ia5096470187ebca72f2c804f32d5b723f40c0b85 PiperOrigin-RevId: 153449059
* Windows MSVC toolchain: Move environment variables setup from wrapper script ↵Gravatar Yun Peng2017-04-06
| | | | | | | to CROSSTOOL Change-Id: Ic6ee5a22412281743267a40623f4a8514a2e70f6 PiperOrigin-RevId: 152252048
* Fix MSVC CROSSTOOL for linking against lib filesGravatar pcloudy2017-03-31
| | | | | | | | | | | | | | | | 1. No need to add /WHOLEARCHIVE option for object files 2. When linking against a .lib file of a dll with /WHOLEARCHIVE option, the linker produces an error. So strip it in msvc_link.py. The second point is a temporary workaround to make TF GPU build work, we'll fix it properly when we figure out how to deal with .lib, .dll, .pdb files on Windwos. Fix https://github.com/bazelbuild/bazel/issues/2753 Change-Id: Ia77b67546bfd4f19ceeb0f6ab9ab3b7a598c4fe9 PiperOrigin-RevId: 151811504
* Don't filter out warning messages from MSVC python wrappers anymore.Gravatar Yun Peng2017-03-28
| | | | | | | | | | | Fixed: https://github.com/bazelbuild/bazel/issues/2666 See: https://github.com/bazelbuild/bazel/issues/2726 RELNOTES: Windows MSVC wrappers: Not filtering warning messages anymore, use --copt=-w and --host_copt=-w to suppress them. -- PiperOrigin-RevId: 151422047 MOS_MIGRATED_REVID=151422047
* MSVC wrapper: support -W[no]implicit-function-decl Gravatar Laszlo Csomor2017-03-14
| | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/2672 -- Change-Id: Idfbc1841cc4f448939000e58cc9712ab8daa1a2f Reviewed-on: https://cr.bazel.build/9353 PiperOrigin-RevId: 150045801 MOS_MIGRATED_REVID=150045801
* MSVC wrapper: support -I gcc flagGravatar Laszlo Csomor2017-02-28
| | | | | | | | See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 148750327 MOS_MIGRATED_REVID=148750327
* Add quotes to improve space supportGravatar Alexander Chung2017-02-07
| | | | | | | | | | | These changes addresses issues where Windows users have a space in their username. Allows the default output_base path to be used. Closes #2491. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2491 PiperOrigin-RevId: 146773331 MOS_MIGRATED_REVID=146773331
* Windows: fix off-by-one errors with MAX_PATHGravatar Laszlo Csomor2017-02-07
| | | | | | | | | | | | | | | | | | In almost every place we compared paths against MAX_PATH, we had it wrong. MAX_PATH is the null-terminated maximum length, so paths exactly MAX_PATH long (not counting the null-terminator) were incorrectly considered short. Also fix the error message in the MSVC python wrapper, because it reported an incorrect path length limit in the warning message. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 146762382 MOS_MIGRATED_REVID=146762382
* msvc_tools.py.tpl: Suppress all warning messages if /w is specified Gravatar Yun Peng2017-01-26
| | | | | | | | | | | Fixed #2433 Working towards #1897 -- Change-Id: I62ed4eabac5c788f90b10e9dfe4c9ffee6883097 Reviewed-on: https://cr.bazel.build/8492 PiperOrigin-RevId: 145675987 MOS_MIGRATED_REVID=145675987
* msvc_tools.py.tpl: Change default runtime library to staticGravatar Yun Peng2017-01-25
| | | | | | | | Fixed https://github.com/bazelbuild/bazel/issues/2415 -- PiperOrigin-RevId: 145530562 MOS_MIGRATED_REVID=145530562
* Windows: fix MSVC compilations at HEAD Gravatar László Csomor2017-01-23
| | | | | | | | | | | | | | | | | | | | | | Strip quotes from arg0 in call_python.bat . This bug was has been there longer, but never got triggered, because we only quoted arg0 if it contained spaces, which it most likely never actually did, or not in this particular case. After submitting e68c6b5 and 9e8bc63 which fixed the compilation errors in the former, we started always quoting argv0 in subprocesses, which exposed this bug, leading to a corrupt DRIVER_DIR value in call_python.bat. Fixes https://github.com/bazelbuild/bazel/issues/2402 -- Change-Id: Iab5c00001fc4307f2e23c46c8187f5ef15d83d41 Reviewed-on: https://cr.bazel.build/8436 PiperOrigin-RevId: 145310121 MOS_MIGRATED_REVID=145310121
* Improved support for /MD and /MT in MSVC [#2120]Gravatar Javier Dehesa2016-12-07
| | | | | | | | | | | | | | | | | msvc_tools.py now prefers the last /MT / /MD option given; if none, /MD is preferred. Additionally, the behaviour of the copt -g has been improved to enforce the debug version of the user-selected runtime, not necessarily /MTd. Issue: #2120 Closes #2141. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/2141 PiperOrigin-RevId: 141294930 MOS_MIGRATED_REVID=141294930
* Windows: Fix cuda option parsing when /Od is passedGravatar Yun Peng2016-12-07
| | | | | | | | | | When not using -c opt, /Od will be passed instead of /O2 -- Change-Id: I693020d51d45e054e10a94a5e1754b89c44c7ff4 Reviewed-on: https://cr.bazel.build/7670 PiperOrigin-RevId: 141291490 MOS_MIGRATED_REVID=141291490
* Add gpu compile support to MSVC wrapper scriptGravatar Yun Peng2016-11-22
| | | | | | | | | | | | | | | | | | | | | | Fix https://github.com/bazelbuild/bazel/issues/2075 The logic for constructing nvcc options is from: third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl in TensorFlow repo. To make things configurable, this change makes cc_configure.bzl depend on more environment variables: CUDA_PATH: This variable points to Cuda installation directory CUDA_COMPUTE_CAPABILITIES: Specifiy cuda compute capabilities NO_WHOLE_ARCHIVE_OPTION: if set to 1, /WHOLEARCHIVE option won't be used. -- Change-Id: Ib1610a6d3423ca55a27c7a0f438703c05630a85c Reviewed-on: https://cr.bazel.build/7351 MOS_MIGRATED_REVID=139903436
* msvc_tool.py: Don't replace \ with \\ in NormPathGravatar Yun Peng2016-11-08
| | | | | | | | | | | | No need to use double back slash. This could help ease the Windows long path issue. Please see https://github.com/tensorflow/tensorflow/pull/5385 -- Change-Id: Iecca529209499062bfc1351e3a2b46dc51e0be09 Reviewed-on: https://bazel-review.googlesource.com/#/c/7210 MOS_MIGRATED_REVID=138397390
* Reimplement whole archive on WindowsGravatar Yun Peng2016-10-25
| | | | | | | | | | | | Use wrapper script to get object files if /WHOLEARCHIVE is not supported. fix https://github.com/bazelbuild/bazel/issues/1978 work towards https://github.com/bazelbuild/bazel/issues/1918 -- Change-Id: I675311478e65a1e1f3fa963187a5a8da531150d3 Reviewed-on: https://bazel-review.googlesource.com/#/c/6833 MOS_MIGRATED_REVID=137151817
* Make MSVC wrapper script work with Python 3Gravatar Yun Peng2016-10-12
| | | | | | | | | Currently, TensorFlow only supports python3.5 on Windows. -- Change-Id: Ia3e805a7fdca06b79d9c00b0a2e83b9dd41e5f78 Reviewed-on: https://bazel-review.googlesource.com/#/c/6611 MOS_MIGRATED_REVID=135919759
* Some changes in MSVC toolchainGravatar Yun Peng2016-09-26
| | | | | | | | | These changes could help use build TensorFlow on Windows -- Change-Id: I98962add450da234d5965b091607817e991af383 Reviewed-on: https://bazel-review.googlesource.com/#/c/6270 MOS_MIGRATED_REVID=134266671
* Autoconfigure MSVC CROSSTOOLGravatar Yun Peng2016-07-13
| | | | | | | -- Change-Id: I55b2c567a3fc6be15f29d03c5c6e9891ef540072 Reviewed-on: https://bazel-review.googlesource.com/#/c/4012 MOS_MIGRATED_REVID=127184463
* Remove hacks of building dll from msvc_link.pyGravatar Yun Peng2016-07-01
| | | | | | | -- Change-Id: I53ec66581c59d4bba8460fb3e5d20258ea36d0f1 Reviewed-on: https://bazel-review.googlesource.com/#/c/3940 MOS_MIGRATED_REVID=126306276
* Make building dll less a hack on WindowsGravatar Yun Peng2016-07-01
| | | | | | | | | | | | | | | | | | | | Add .dll as a shared library type like .so If we have target: cc_binary( name = "bar.dll", srcs = ["bar.cc"], linkshared = 1, ) Now we can build a dll using bazel build //foo:bar.dll If the target name is still bar.so, the wrapper script also build the dll by copying the output file to bar.dll. -- Change-Id: Ie3d1fb83965ddf691d0cc4734a61a0b0ce89d948 Reviewed-on: https://bazel-review.googlesource.com/#/c/3931 MOS_MIGRATED_REVID=126301390
* Adding features to MSVC CROSSTOOLGravatar Yun Peng2016-07-01
| | | | | | | | | | | | This stops Bazel from passing some of the gcc options to wrapper script. Options we get rid of: -c -o -MD -MF -frandom-seed -isystem -iquote -I -- Change-Id: I416b393c6875a2033d5382a644471c416cd5e8d1 Reviewed-on: https://bazel-review.googlesource.com/#/c/3930 MOS_MIGRATED_REVID=126299789
* MSVC toolchain changes for building TensorFlowGravatar Yun Peng2016-05-10
| | | | | | | -- Change-Id: If41817e3889f118a849a29cfb03ac0f7e07d5557 Reviewed-on: https://bazel-review.googlesource.com/#/c/3582 MOS_MIGRATED_REVID=121924420
* Enable msvc toolchain to support params fileGravatar Yun Peng2016-04-25
| | | | | | | | | Also fixed a small bug -- Change-Id: I22fa16272587471b9652f3b7f7d9cb1341fc6524 Reviewed-on: https://bazel-review.googlesource.com/#/c/3464 MOS_MIGRATED_REVID=120703703
* Prevent msvc toolchain's python wrapper script from generating pyc filesGravatar Yun Peng2016-04-20
| | | | | | | | Otherwise, we have to clean it every time and it will affect the linking in cc_configure.bzl -- MOS_MIGRATED_REVID=120329223
* Refactor wrapper script msvc_tools.py to make path configure easilerGravatar Yun Peng2016-04-12
| | | | | | | | | Also fixed a small bug. -- Change-Id: I05dab2f4a5d6216f2972b0cd2cb62506f5b1cb06 Reviewed-on: https://bazel-review.googlesource.com/#/c/3326/ MOS_MIGRATED_REVID=119529809
* Add the wrapper script for msvc crosstoolGravatar Yun Peng2016-04-07
Using batch script to invoke real wrapper script written in python The default python path is expected to be C:/python_27_amd64/files/python.exe -- Change-Id: If47bf668ce4af2b6d28a1852189c061480816833 Reviewed-on: https://bazel-review.googlesource.com/#/c/3265 MOS_MIGRATED_REVID=119275909