-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
zig cc: unsupported linker arg: -Map=skrouterd.map #18356
Comments
Looks like the first step towards implementing this would be here Lines 2397 to 2402 in 1b0e913
Looking at the previous issues of this kind, it looks to me that fix should be similar to how |
zig cc
I'm marking this as a proposal to indicate that we might not decide to support it after all. Diagnostic and debugging features are important, but it is an area we may choose to diverge from other tools in order to unlock a different set of design requirements. I think it would be better to decide what to do about this feature request until after #17749 is done. |
After having a second look at the project I wanted to cross-compile, I realized that indeed the linker map is written out only for human inspection and the software itself does not touch it afterwards. It does not even try to install the map file to /usr/share or something like that... Previously I somehow got stuck on the idea that it loads the map file at runtime and parses out something out of it, which simply is not the case. (It does open and read So, I used cmake to check for -Map availability and skip it if not supported. Problem solved.
|
Nice work finding a workaround - thanks for sharing it here. |
Zig Version
0.11.0
Steps to Reproduce and Observed Behavior
Here's a fragment of my actual command (obtained from
VERBOSE=1 make
)Clang does not complain about the -Map option (and if all parameters were given, the linking would succeed)
When I run the same compilation with
zig cc
instead of clang, I get an error from command line argument parserExpected Behavior
Please support the
-Map=
linker argument. I can try looking into this myself if given some initial pointers on what needs to be done. Thanks.The text was updated successfully, but these errors were encountered: