question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bazel calls VS 2010's cl with /DEBUG:FASTLINK

See original GitHub issue
G:\src\test_projects\bazel_tutorial>bazel info release
release 0.5.0

G:\src\test_projects\bazel_tutorial>set bazel_vs
BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio 10.0

G:\src\test_projects\bazel_tutorial>bazel build main:hello-world --verbose_failures
...
  external/local_config_cc/wrapper/bin/msvc_cl.bat /nologo -Wl,-S /OUT:bazel-out/msvc_x64-fastbuild/bin/main/hello-world.exe /MACH
INE:X64 /SUBSYSTEM:CONSOLE -Xcompilation-mode=fastbuild -Wl,@bazel-out/msvc_x64-fastbuild/bin/main/hello-world.exe-2.params /DEFAU
LTLIB:libcmt.lib /DEBUG:FASTLINK /INCREMENTAL:NO: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with
status 1117.
LINK : fatal error LNK1117: syntax error in option 'DEBUG:FASTLINK'

As far as I can tell, cl.exe supports /DEBUG:FASTLINK only in versions 2015 or later. In the earlier versions, it’s only /DEBUG. I didn’t see a list of supported VS versions, e. g. on the Using Bazel on Windows page.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sbilkoloftcommented, Sep 13, 2017

And things work with 2017 now btw.

1reaction
meteorcloudycommented, Sep 12, 2017

@sbilkoloft I suspect cinttypes might doesn’t exist in older version of MSVC, since port.h depends on it, it’s unlikely we can build Bazel with it.

But, what you can do is using an existing Bazel binary with a custom CROSSTOOL, Here’s one you can use easily, https://github.com/meteorcloudy/windows-crosstool Download the repo, and use the local_repository rule to use this CROSSTOOL. Then you can modify the CROSSTOOL without rebuilding Bazel itself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Bazel on Windows
Running Bazel: MSYS2 shell vs. command prompt vs. PowerShell ... You can enable the Clang toolchain by a build flag --compiler=clang-cl .
Read more >
Commands and Options | Bazel
dbg means build with debugging enabled ( -g ), so that you can use gdb (or another debugger). opt means build with optimization...
Read more >
Command-Line Reference | Bazel
If false, then Bazel does not perform a system call. ... default: "true": Whether or not to look for the home bazelrc file...
Read more >
C / C++ Rules - Bazel
If the named rule's outs are C or C++ source files, they are compiled into ... This is useful if your code isn't...
Read more >
Macros | Bazel
A macro is a function called from the BUILD file that can instantiate rules. ... Note that native can only be used in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found