-
Notifications
You must be signed in to change notification settings - Fork 5.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
build: don't produce thin archives #1231
Conversation
These archives are incompatible with Microsoft's link.exe, so rustc can't link such libraries out of the box.
03321c2
to
a4f0c2c
Compare
Can you also build a new |
# TODO: Is there a way to use it without the involvement of args.gn? | ||
if os.name == "nt": | ||
tc = "//build_extra/toolchain/win:win_clang_x64" | ||
out += ['custom_toolchain="%s"' % tc, 'host_toolchain="%s"' % tc] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configuration shouldn't be in setup.py - configuration should be in gn files - that's the purpose of gn. I should have said this before when the above configurations were added here.
We should fork BUILDCONFIG.gn
and set the toolchain other settings in this file there. Alternatively you can start tools/args_win.gn
and copy that into place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not possible without forking //build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain? can't you just change this line?
https://github.com/denoland/deno/blob/master/.gn#L6
@@ -111,7 +111,7 @@ template("msvc_toolchain") { | |||
|
|||
# lld-link includes a replacement for lib.exe that can produce thin | |||
# archives and understands bitcode (for lto builds). | |||
lib = "$prefix/$lld_link /lib /llvmlibthin" | |||
lib = "$prefix/$lld_link /lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a gn flag for this, and we should send the patch upstream. I'd very much like to not diverge from chrome's build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a gn flag for this, and we should send the patch upstream.
I'd very much like to not diverge from chrome's build.
Those comments are in direct conflict with one another. This BUILD.gn is derived from chromiums and modified with some simple sed edits. You can opt to either full-on fork it or you can live without the flag for now.
"Add these gn arguments:") | ||
print(" custom_toolchain=\"$win_toolchain\"") | ||
print(" host_toolchain=\"$win_toolchain\"") | ||
assert(win_toolchain_in_use) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove validate.gn after you've forked BUILDCONFIG.gn (or other such way of not relying on setup.py)
Are you able to link to cargo built rust objects now? |
Yes, works smoothly. |
Closing since review comments can't be addressed. |
No description provided.