-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
build: allow unbundling of Node.js dependencies #55903
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,10 +150,6 @@ template("node_gn_build") { | |
] | ||
deps = [ | ||
":run_node_js2c", | ||
"deps/brotli", | ||
"deps/cares", | ||
"deps/histogram", | ||
"deps/llhttp", | ||
"deps/nbytes", | ||
"deps/nghttp2", | ||
"deps/ngtcp2", | ||
|
@@ -179,7 +175,17 @@ template("node_gn_build") { | |
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ] | ||
configs += [ "//build/config/gcc:symbol_visibility_default" ] | ||
} | ||
|
||
if (use_system_llhttp) { | ||
libs += [ "llhttp" ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This passes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. selfisekai - to clarify, should this instead be:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be pkg_config on |
||
} else { | ||
deps += [ "deps/llhttp" ] | ||
} | ||
if (use_system_histogram) { | ||
libs += [ "hdr_histogram" ] | ||
include_dirs += [ "/usr/include/hdr" ] | ||
Comment on lines
+184
to
+185
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also should be pkg_config on |
||
} else { | ||
deps += [ "deps/histogram" ] | ||
} | ||
if (v8_enable_i18n_support) { | ||
deps += [ "//third_party/icu" ] | ||
} | ||
|
@@ -206,6 +212,19 @@ template("node_gn_build") { | |
sources += node_inspector.node_inspector_sources + | ||
node_inspector.node_inspector_generated_sources | ||
} | ||
if (is_linux) { | ||
import("//build/config/linux/pkg_config.gni") | ||
if (use_system_cares) { | ||
pkg_config("cares") { | ||
packages = [ "libcares" ] | ||
} | ||
} | ||
if (use_system_nghttp2) { | ||
pkg_config("nghttp2") { | ||
packages = [ "libnghttp2" ] | ||
} | ||
} | ||
} | ||
} | ||
|
||
executable(target_name) { | ||
|
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.
What about Ada?
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'd say it's a small user group because Ada uses C++ types that are not ABI-compatible between LLVM libc++ (linked statically by Chromium as default) and libstdc++ (used as the system one by most distros).
use_custom_libcxx=false
is very broken, and pretty much the only distros I know of using it currently are Chimera Linux (which uses libc++ as system, and patches libc++ to keep Chromium working), Debian, and openSUSEThere 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.
That's educational. Thanks!
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.
To clarify: openSUSE uses
use_custom_libcxx=false
for Electron (which i maintain), but not for Chromium (which i don't, and don't have resources to).It's much more important that it stays usable for Electron, since requiring a custom C++ implementation would also require changes in packaging every Electron application we ship that has native modules.