Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

piscisaureus
Copy link
Member

No description provided.

These archives are incompatible with Microsoft's link.exe, so rustc
can't link such libraries out of the box.
@piscisaureus piscisaureus requested a review from ry November 28, 2018 00:23
@piscisaureus piscisaureus force-pushed the nothin branch 2 times, most recently from 03321c2 to a4f0c2c Compare November 28, 2018 00:28
@ry
Copy link
Member

ry commented Nov 28, 2018

Can you also build a new v8.lib for prebuilt, so we can verify that this change is actually fixing a bug?

# 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]
Copy link
Member

@ry ry Nov 28, 2018

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.

Copy link
Member Author

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.

Copy link
Member

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"
Copy link
Member

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.

Copy link
Member Author

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)
Copy link
Member

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)

@ry
Copy link
Member

ry commented Nov 28, 2018

Are you able to link to cargo built rust objects now?

@piscisaureus
Copy link
Member Author

Are you able to link to cargo built rust objects now?

Yes, works smoothly.

@piscisaureus
Copy link
Member Author

Closing since review comments can't be addressed.

@piscisaureus piscisaureus deleted the nothin branch November 28, 2018 00:47
@ry ry mentioned this pull request Nov 28, 2018
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants