-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows command-line translation regression on 0.5.3-rc2 #3425
Comments
@grandseiken This is an intended behavior. We are not using wrapper script on Windows anymore, so gcc flags If you still want to use wrapper script, you can add FYI: 86a9a50 |
Thank you for the explanation. |
@meteorcloudy I notice that 0.5.3 still seems to perform a limited amount of command-line translation on Windows, such as replacing Edit: nevermind, I think this is actually MSVC accepting both kinds of argument and has nothing to do with Bazel, sorry. |
@grandseiken Did you see this from some warning messages from cl.exe? The MSVC compiler accepts flags like |
Yep, I worked that out a minute after I commented. Thanks! |
Description of the problem / feature request / question:
I'm trying to link against standard system libraries (
advapi32.lib
and friends) with Bazel on windows. On 0.5.2, I could do this by adding-Wl,advapi32.lib
to thelinkopts
of a C++ rule as described in #1945. On 0.5.3-rc2, the command-line translation does not seem to match this case properly any more. The linker warnswarning LNK4044: unrecognized option '/Wl,advapi32.lib'; ignored
, and I get the usual unresolved symbol errors.I can work around the problem on 0.5.3-rc2 by giving the
linkopts
value"-this_flag_does_not_exist advapi32.lib"
, which prints a warning aboutunrecognized option '/this_flag_does_not_exist'
but actually gets interpreted as two separate flags and ends up linking correctly. However, this is a big hack, and doesn't work on 0.5.2, so I don't yet know of any trick that works for both 0.5.2 and 0.5.3.If possible, provide a minimal example to reproduce the problem:
Should compile without
unrecognized option '/Wl,advapi32.lib'
warning.Environment info
bazel info release
):release 0.5.3rc2
The text was updated successfully, but these errors were encountered: