mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
deno: 2.7.14 -> 2.8.0, rusty-v8: 147.4.0 -> 149.0.0
This also adapts the patches to work with LLVM 21, drops the
adler/adler2 flags, but has to add a symlink in
third_party/rust-toolchain, else rustc isn't found (and the gn
rust_sysroot_absolute should stay as well to set internal gn args that
this is a stable rust toolchain).
(cherry picked from commit 2f37da318e)
This commit is contained in:
parent
39a8be847c
commit
8c0926b4d2
5 changed files with 177 additions and 38 deletions
|
|
@ -32,17 +32,17 @@ let
|
|||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "deno";
|
||||
version = "2.7.14";
|
||||
version = "2.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "denoland";
|
||||
repo = "deno";
|
||||
tag = "v${finalAttrs.version}";
|
||||
fetchSubmodules = true; # required for tests
|
||||
hash = "sha256-tkZc89JOhXCdMVSAOQYGR6HDe7KmCI5/haLH1RP2p7I=";
|
||||
hash = "sha256-gcDQ2nkiLtnOJCneiHAWwvYxHUwQ/2n2lsmWAMgf/yc=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-bFQLsAF4hFBRw04VaL+sxvxIZ9p7nXOLSr2BIZKcwiI=";
|
||||
cargoHash = "sha256-1vHgkLWqwTt3tO4qSkfqwCj5KMfKCT3kscChf2FrkH8=";
|
||||
|
||||
patches = [
|
||||
./patches/0002-tests-replace-hardcoded-paths.patch
|
||||
|
|
|
|||
|
|
@ -70,34 +70,26 @@ let
|
|||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "rusty-v8";
|
||||
version = "147.4.0";
|
||||
version = "149.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "denoland";
|
||||
repo = "rusty_v8";
|
||||
tag = "v${finalAttrs.version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-cS9oBDY2+9RtdqPuOadNl0Lce89ESpBb1qPiWSHPiCg=";
|
||||
hash = "sha256-OdVz8d8hkBhXZnX9vKV51rlHAYN2PbVycmqrDWNLV5M=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./librusty_v8_no_downloads.patch
|
||||
(fetchpatch {
|
||||
name = "chromium-146-revert-Update-fsanitizer=array-bounds-config.patch";
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/7539408
|
||||
url = "https://chromium.googlesource.com/chromium/src/+/acb47d9a6b56c4889a2ed4216e9968cfc740086c^!?format=TEXT";
|
||||
decode = "base64 -d";
|
||||
revert = true;
|
||||
includes = [ "build/config/compiler/BUILD.gn" ];
|
||||
hash = "sha256-0yEK66IEyS8xABDHY4W8oIvl4Ga1JfL1wxQy8PhXyqI=";
|
||||
})
|
||||
./librusty_v8_revert_-fno-lifetime-dse.patch
|
||||
./llvm22.patch
|
||||
./gn_inputs_fix.patch
|
||||
]
|
||||
++ lib.optionals stdenv.targetPlatform.isDarwin [
|
||||
./librusty_v8-darwin-fix-__rust_no_alloc_shim_is_unstable_v2.patch
|
||||
];
|
||||
|
||||
cargoHash = "sha256-e/G9AevaJwqYdr8022kmv05Mwzi4Cishj9imLproNB0=";
|
||||
cargoHash = "sha256-uj1B3lkgbZG5emJgfsilJXdHbqg0JNAywaSVLe/LbWk=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
llvmPackages.clang
|
||||
|
|
@ -119,6 +111,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
apple-sdk_15
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
ln -sv ${rustToolchain} third_party/rust-toolchain
|
||||
'';
|
||||
|
||||
env = {
|
||||
V8_FROM_SOURCE = 1;
|
||||
PYTHON = "python3";
|
||||
|
|
@ -132,9 +128,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
"rustc_version=\"${rustc.version}\""
|
||||
"rust_sysroot_absolute=\"${rustToolchain}\""
|
||||
"rust_bindgen_root=\"${rustToolchain}\""
|
||||
# To accomodate our newer rustc compiler
|
||||
"removed_rust_stdlib_libs=[\"adler\"]"
|
||||
"added_rust_stdlib_libs=[\"adler2\"]"
|
||||
]
|
||||
++ lib.optional stdenv.targetPlatform.isDarwin "mac_deployment_target=\"${stdenv.targetPlatform.darwinMinVersion}\""
|
||||
);
|
||||
|
|
|
|||
105
pkgs/by-name/de/deno/rusty-v8/gn_inputs_fix.patch
Normal file
105
pkgs/by-name/de/deno/rusty-v8/gn_inputs_fix.patch
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
Submodule build contains modified content
|
||||
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni
|
||||
index b9b5b0d76..4004f306e 100644
|
||||
--- a/build/toolchain/gcc_toolchain.gni
|
||||
+++ b/build/toolchain/gcc_toolchain.gni
|
||||
@@ -712,7 +712,6 @@ template("single_gcc_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $libname -- -Clinker=\"${invoker.cxx}\" {{source}} LDFLAGS RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_rlib") {
|
||||
@@ -745,7 +744,6 @@ template("single_gcc_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link,metadata=$rmetaname -o $rlibname -- -Clinker=\"${invoker.cxx}\" {{source}} LDFLAGS RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_bin") {
|
||||
@@ -767,7 +765,6 @@ template("single_gcc_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $exename -- -Clinker=\"${invoker.cxx}\" {{source}} LDFLAGS {{ldflags}} ${extra_ldflags} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_cdylib") {
|
||||
@@ -790,7 +787,6 @@ template("single_gcc_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $dllname -- -Clinker=\"${invoker.cxx}\" {{source}} LDFLAGS {{ldflags}} ${extra_ldflags} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_dylib") {
|
||||
@@ -815,7 +811,6 @@ template("single_gcc_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link,metadata=$rmetaname -o $dllname -- -Clinker=\"${invoker.cxx}\" {{source}} LDFLAGS {{ldflags}} ${extra_ldflags} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_macro") {
|
||||
@@ -838,7 +833,6 @@ template("single_gcc_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $dllname -- -Clinker=\"${invoker.cxx}\" {{source}} LDFLAGS {{ldflags}} ${extra_ldflags} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/build/toolchain/apple/toolchain.gni b/build/toolchain/apple/toolchain.gni
|
||||
index 0aa4e736f..e3f59728d 100644
|
||||
--- a/build/toolchain/apple/toolchain.gni
|
||||
+++ b/build/toolchain/apple/toolchain.gni
|
||||
@@ -325,7 +325,6 @@ template("single_apple_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $libname -- -Clinker=\"$_cxx\" {{source}} LDFLAGS $bin_flag RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_rlib") {
|
||||
@@ -359,7 +358,6 @@ template("single_apple_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link,metadata=$rmetaname -o $rlibname -- -Clinker=\"$_cxx\" {{source}} LDFLAGS RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_bin") {
|
||||
@@ -392,7 +390,6 @@ template("single_apple_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$linker_driver_env $rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $exename -- -Clinker=\"$linker_driver\" {{source}} LDFLAGS $linker_driver_args $bin_flag {{ldflags}} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_cdylib") {
|
||||
@@ -427,7 +424,6 @@ template("single_apple_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$linker_driver_env $rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $dllname -- -Clinker=\"$linker_driver\" {{source}} LDFLAGS $linker_driver_args $bin_flag {{ldflags}} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_dylib") {
|
||||
@@ -464,7 +460,6 @@ template("single_apple_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$linker_driver_env $rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link,metadata=$rmetaname -o $dllname -- -Clinker=\"$linker_driver\" {{source}} LDFLAGS $linker_driver_args {{ldflags}} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
|
||||
tool("rust_macro") {
|
||||
@@ -499,7 +494,6 @@ template("single_apple_toolchain") {
|
||||
"$rustc_common_args {{rustdeps}} {{externs}} SOURCES {{sources}}"
|
||||
command = "$rustc_wrapper --depfile=$depfile --emit=dep-info=$depfile,link -o $dllname -- -Clinker=\"${_cxx}\" {{source}} LDFLAGS $bin_flag {{ldflags}} RUSTENV {{rustenv}}"
|
||||
rust_sysroot = rust_sysroot_relative
|
||||
- inputs = rustc_wrapper_inputs
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Submodule build contains modified content
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index ff8022f04..59699e1d4 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -625,13 +625,6 @@ config("compiler") {
|
||||
]
|
||||
}
|
||||
|
||||
- # The performance improvement does not seem worth the risk. See
|
||||
- # https://crbug.com/484082200 for background and https://crrev.com/c/7593035
|
||||
- # for discussion.
|
||||
- if (!is_wasm) {
|
||||
- cflags += [ "-fno-lifetime-dse" ]
|
||||
- }
|
||||
-
|
||||
# TODO(hans): Remove this once Clang generates better optimized debug info
|
||||
# by default. https://crbug.com/765793
|
||||
cflags += [
|
||||
60
pkgs/by-name/de/deno/rusty-v8/llvm22.patch
Normal file
60
pkgs/by-name/de/deno/rusty-v8/llvm22.patch
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
Submodule build contains modified content
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index 1b53cb1d4..724f867f5 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -1916,7 +1916,6 @@ ubsan_hardening("c_array_bounds") {
|
||||
# the related warning about "unsafe-buffer-usage-in-static-sized-array",
|
||||
# since we know that the array bounds sanitizing will catch any out-of-
|
||||
# bounds accesses.
|
||||
- cflags = [ "-Wno-unsafe-buffer-usage-in-static-sized-array" ]
|
||||
}
|
||||
|
||||
# Enable UBSan subset to ensure we always hit `return` statement in non-void
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index 1b53cb1d4..51367ceb2 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -601,7 +601,6 @@ config("compiler") {
|
||||
# Flags for diagnostics.
|
||||
cflags += [ "-fcolor-diagnostics" ]
|
||||
if (!is_win) {
|
||||
- cflags += [ "-fdiagnostics-show-inlining-chain" ]
|
||||
} else {
|
||||
# Combine after https://github.com/llvm/llvm-project/pull/192241
|
||||
cflags += [ "/clang:-fdiagnostics-show-inlining-chain" ]
|
||||
diff --git a/build/config/sanitizers/sanitizers.gni b/build/config/sanitizers/sanitizers.gni
|
||||
index 329a2fc8b..083b635e3 100644
|
||||
--- a/build/config/sanitizers/sanitizers.gni
|
||||
+++ b/build/config/sanitizers/sanitizers.gni
|
||||
@@ -535,12 +535,6 @@ template("ubsan_hardening") {
|
||||
"-fsanitize=${invoker.sanitizer}",
|
||||
"-fsanitize-trap=${invoker.sanitizer}",
|
||||
|
||||
- # Prevents `__has_feature(undefined_behavior_sanitizer)`
|
||||
- # from evaluating true. Configs defined here are intended to
|
||||
- # be usable even in release builds, i.e. as widely as possible.
|
||||
- # It's important not to have full-on UBSan workarounds activate
|
||||
- # just because we built support for a specific sanitizer.
|
||||
- "-fsanitize-ignore-for-ubsan-feature=${invoker.sanitizer}",
|
||||
]
|
||||
if (defined(invoker.cflags)) {
|
||||
cflags += invoker.cflags
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
index ff8022f04..59699e1d4 100644
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -625,13 +625,6 @@ config("compiler") {
|
||||
]
|
||||
}
|
||||
|
||||
- # The performance improvement does not seem worth the risk. See
|
||||
- # https://crbug.com/484082200 for background and https://crrev.com/c/7593035
|
||||
- # for discussion.
|
||||
- if (!is_wasm) {
|
||||
- cflags += [ "-fno-lifetime-dse" ]
|
||||
- }
|
||||
-
|
||||
# TODO(hans): Remove this once Clang generates better optimized debug info
|
||||
# by default. https://crbug.com/765793
|
||||
cflags += [
|
||||
Loading…
Add table
Add a link
Reference in a new issue