summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /src/etc
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/installer/msi/rust.wxs8
-rw-r--r--src/etc/installer/pkg/Distribution.xml6
-rwxr-xr-xsrc/etc/rust-gdb4
-rwxr-xr-xsrc/etc/rust-gdbgui6
-rw-r--r--src/etc/rust_analyzer_settings.json (renamed from src/etc/vscode_settings.json)0
5 files changed, 22 insertions, 2 deletions
diff --git a/src/etc/installer/msi/rust.wxs b/src/etc/installer/msi/rust.wxs
index 0aa0784e5..f29e1e4d2 100644
--- a/src/etc/installer/msi/rust.wxs
+++ b/src/etc/installer/msi/rust.wxs
@@ -119,7 +119,7 @@
<SetProperty Sequence="ui" Before="CostFinalize"
Id="WixAppFolder" Value="WixPerUserFolder">NOT ALLUSERS</SetProperty>
- <!-- UI sets ALLUSERS per user selection; progagate this choice to MSIINSTALLPERUSER before executing installation actions -->
+ <!-- UI sets ALLUSERS per user selection; propagate this choice to MSIINSTALLPERUSER before executing installation actions -->
<SetProperty Sequence="ui" Before="ExecuteAction"
Id="MSIINSTALLPERUSER" Value="1">NOT ALLUSERS</SetProperty>
@@ -167,7 +167,9 @@
<?if $(env.CFG_MINGW)="1" ?>
<Directory Id="Gcc" Name="." />
<?endif?>
+ <!-- tool-rust-docs-start -->
<Directory Id="Docs" Name="." />
+ <!-- tool-rust-docs-end -->
<Directory Id="Cargo" Name="." />
<Directory Id="Std" Name="." />
</Directory>
@@ -209,6 +211,7 @@
<RegistryValue Root="HKMU" Key="$(var.BaseRegKey)" Name="RustShell" Type="integer" Value="1" KeyPath="yes" />
<RemoveFolder Id="ApplicationProgramsFolder1" On="uninstall" />
</Component>
+ <!-- tool-rust-docs-start -->
<Component Id="DocIndexShortcut" Guid="*">
<Shortcut Id="RustDocs"
Name="$(var.ProductName) Documentation"
@@ -217,6 +220,7 @@
<RegistryValue Root="HKMU" Key="$(var.BaseRegKey)" Name="RustDocs" Type="integer" Value="1" KeyPath="yes" />
<RemoveFolder Id="ApplicationProgramsFolder2" On="uninstall" />
</Component>
+ <!-- tool-rust-docs-end -->
</Directory>
</Directory>
@@ -256,6 +260,7 @@
<ComponentGroupRef Id="GccGroup" />
</Feature>
<?endif?>
+ <!-- tool-rust-docs-start -->
<Feature Id="Docs"
Title="HTML documentation"
Display="5"
@@ -264,6 +269,7 @@
<ComponentGroupRef Id="DocsGroup" />
<ComponentRef Id="DocIndexShortcut" />
</Feature>
+ <!-- tool-rust-docs-end -->
<Feature Id="Path"
Title="Add to PATH"
Description="Add Rust to PATH environment variable"
diff --git a/src/etc/installer/pkg/Distribution.xml b/src/etc/installer/pkg/Distribution.xml
index 64f6bab9b..1643fc836 100644
--- a/src/etc/installer/pkg/Distribution.xml
+++ b/src/etc/installer/pkg/Distribution.xml
@@ -15,7 +15,9 @@
<line choice="rustc"/>
<line choice="rust-std"/>
<line choice="cargo"/>
+ <!-- tool-rust-docs-start -->
<line choice="rust-docs"/>
+ <!-- tool-rust-docs-end -->
</line>
<line choice="uninstall" />
</choices-outline>
@@ -55,15 +57,19 @@
>
<pkg-ref id="org.rust-lang.rust-std"/>
</choice>
+ <!-- tool-rust-docs-start -->
<choice id="rust-docs" visible="true"
title="Documentation" description="HTML documentation."
selected="(!choices.uninstall.selected &amp;&amp; choices['rust-docs'].selected) || (choices.uninstall.selected &amp;&amp; choices.install.selected)"
>
<pkg-ref id="org.rust-lang.rust-docs"/>
</choice>
+ <!-- tool-rust-docs-end -->
<pkg-ref id="org.rust-lang.rustc" version="0" onConclusion="none">rustc.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.cargo" version="0" onConclusion="none">cargo.pkg</pkg-ref>
+ <!-- tool-rust-docs-start -->
<pkg-ref id="org.rust-lang.rust-docs" version="0" onConclusion="none">rust-docs.pkg</pkg-ref>
+ <!-- tool-rust-docs-end -->
<pkg-ref id="org.rust-lang.rust-std" version="0" onConclusion="none">rust-std.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.uninstall" version="0" onConclusion="none">uninstall.pkg</pkg-ref>
<background file="rust-logo.png" mime-type="image/png"
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index b950cea79..9abed30ea 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -13,6 +13,8 @@ fi
# Find out where the pretty printer Python module is
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+# Get the commit hash for path remapping
+RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
# Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `RUST_GDB` to overwrite the call to a
@@ -21,4 +23,6 @@ RUST_GDB="${RUST_GDB:-gdb}"
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" exec ${RUST_GDB} \
--directory="$GDB_PYTHON_MODULE_DIRECTORY" \
-iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
+ -iex "set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust" \
"$@"
+
diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
index 590e488e6..913269316 100755
--- a/src/etc/rust-gdbgui
+++ b/src/etc/rust-gdbgui
@@ -42,6 +42,8 @@ fi
# Find out where the pretty printer Python module is
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+# Get the commit hash for path remapping
+RUSTC_COMMIT_HASH="$("$RUSTC" -vV | sed -n 's/commit-hash: \([a-zA-Z0-9_]*\)/\1/p')"
# Set the environment variable `RUST_GDB` to overwrite the call to a
# different/specific command (defaults to `gdb`).
@@ -53,7 +55,9 @@ RUST_GDBGUI="${RUST_GDBGUI:-gdbgui}"
# These arguments get passed through to GDB and make it load the
# Rust pretty printers.
-GDB_ARGS="--directory=\"$GDB_PYTHON_MODULE_DIRECTORY\" -iex \"add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY\""
+GDB_ARGS="--directory=\"$GDB_PYTHON_MODULE_DIRECTORY\"" \
+ "-iex \"add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY\"" \
+ "-iex \"set substitute-path /rustc/$RUSTC_COMMIT_HASH $RUSTC_SYSROOT/lib/rustlib/src/rust\""
# Finally we execute gdbgui.
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" \
diff --git a/src/etc/vscode_settings.json b/src/etc/rust_analyzer_settings.json
index dd01bfaa7..dd01bfaa7 100644
--- a/src/etc/vscode_settings.json
+++ b/src/etc/rust_analyzer_settings.json