-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
v8: fixes darwin build #25837
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
v8: fixes darwin build #25837
Conversation
@czyzykowski, thanks for your PR! By analyzing the history of the files in this pull request, we identified @proglodyte and @peti to be potential reviewers. |
|
||
NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow"; | ||
|
||
buildFlags = [ | ||
"LINK=g++" | ||
(if clangFlag == "1" then "LINK=clang++" else "LINK=g++") |
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.
I think it's better practice to just do "LINK=c++", that should work in gcc and clang.
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.
I'll try that.
pkgs/top-level/all-packages.nix
Outdated
@@ -10198,6 +10198,7 @@ with pkgs; | |||
|
|||
v8 = callPackage ../development/libraries/v8 { | |||
inherit (python2Packages) python gyp; | |||
libtool = darwin.cctools; |
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.
This name seems a bit confusing because it will get confused with GNU lib tool. How about just calling it "cctools" instead?
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.
Sure, I followed what I found already in the file, but that would make more sense.
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.
Ok I see now it is used by others, so it's fine to leave it as is.
Thanks for your contribution! If you are able to you might want to look into applying these patches to other versions of v8. I'm not sure if any others have these problems, though. |
@matthewbauer should that be a separate PR or part of this one? |
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.
This still needs some changes to work properly without xcode (or with sandboxing) gyp needs an xcode patch similar to nodejs. Currently this will fail with gyp: No Xcode or CLT version detected!
on hydra.
@LnL7 The latest change successfully builds on a machine without Xcode. |
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.
Perfect! Can you squash the commits.
On the commit message:
|
v8 compilation on macOS was failing because of missing dependency and wrong linker. The approach to make it work is similar to the nodejs package.
Motivation for this change
v8 compilation on macOS was failing because of missing dependency and wrong linker. This PR fixes those problems.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)