rust icon indicating copy to clipboard operation
rust copied to clipboard

Support raw-dylib functions being used inside inlined functions

Open dpaoliello opened this issue 1 year ago • 3 comments

Fixes #102714

Issue Details: When generating the import library for raw-dylib symbols, we currently only use the functions and variables declared within the current crate. This works fine if all crates are static libraries or rlibs as the generated import library will be contained in the static library or rlib itself, but if a dependency is a dynamic library AND the use of a raw-dylib function or variable is inlined or part of a generic instantiation then the current crate won't see its dependency's import library and so linking will fail.

Fix Details: Instead, when we generate the import library for a dylib or bin crate, we will now generate it for the symbols both for the current crate and all upstream crates. We do this in two steps so that the import library for the current crate is passed into the linker first, thus it is preferred if there are any ambiguous symbols.

dpaoliello avatar Oct 12 '22 22:10 dpaoliello

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

rustbot avatar Oct 12 '22 22:10 rustbot

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive avatar Oct 12 '22 22:10 rust-highfive

r? @michaelwoerister

dpaoliello avatar Oct 17 '22 17:10 dpaoliello

Thanks, @dpaoliello! I'm in the process of reviewing this.

michaelwoerister avatar Oct 20 '22 11:10 michaelwoerister

This issue exists for all kinds on native libraries, not only raw dylibs.

If we have a tree like this

- Final executable
  - Rust dylib
    - Native dylib
    - Native raw dylib
    - Native staticlib

then the "Rust dylib" can leak symbols from all the native libs through inline/const/generic functions.

For this reason

  • Native dylibs have to be linked into the final binary even if they were already linked into the intermediate Rust dylib (rustc already does this for long time).
  • Native raw dylibs have to be linked into the final binary even if they were already linked into the intermediate Rust dylib (this PR implement it).
  • Not sure what happens with native staticlibs, does Rust dylib just always export their symbols so they are available from the Rust dylib in case of inlining?

Also, what happens with Rust dylib dependencies of the second order (Final executable -> Rust dylib -> Rust dylib -> Native libs)? Are they also always linked into the final binary (together with their native dependencies)? UPD: Yes, they are.

This all feels suboptimal. Perhaps we need an analysis that determines which exactly native symbols are leaked through inline/const/generic functions, and which exactly libraries need to be linked into the final binary due to them. We are already doing something similar when calculating export symbols sets.

petrochenkov avatar Oct 20 '22 12:10 petrochenkov

Not sure what happens with native staticlibs, does Rust dylib just always export their symbols so they are available from the Rust dylib in case of inlining?

I believe it exports all functions which you declared in extern "C" { ... } where you actually used #[link(name = "...")] to indicate what library it originated from.

bjorn3 avatar Oct 20 '22 13:10 bjorn3

Perhaps we need an analysis that determines which exactly native symbols are leaked through inline/const/generic functions, and which exactly libraries need to be linked into the final binary due to them.

@petrochenkov, to make sure I understand this correctly: you propose to do pretty much the same as this PR, but generate import libraries that only contain the symbols that are actually needed?

michaelwoerister avatar Oct 20 '22 13:10 michaelwoerister

@michaelwoerister Yes, and do the same thing for dylibs and staticlibs too. Not in this PR, of course.

petrochenkov avatar Oct 20 '22 14:10 petrochenkov

@michaelwoerister Yes, and do the same thing for dylibs and staticlibs too. Not in this PR, of course.

Yes, that sounds reasonable to me. Although there is a trade-off between the additional complexity this might introduce in rustc (not sure how complex it would actually be) and the gains we might expect from generating more targeted import libs. I'd guess, there's no way of telling without giving it a try.

But yes, not in this PR.

michaelwoerister avatar Oct 21 '22 09:10 michaelwoerister

Thanks for the PR, @dpaoliello! The implementation looks good to me :)

It would be great to add another test for the transitive case @petrochenkov mentions, i.e. executable -> dylib -> dylib -> native raw dylib. That should be achievable by adding another Rust dylib with a public #[inline] function that in turn calls inline_library_function().

michaelwoerister avatar Oct 21 '22 09:10 michaelwoerister

Thanks for the PR, @dpaoliello! The implementation looks good to me :)

It would be great to add another test for the transitive case @petrochenkov mentions, i.e. executable -> dylib -> dylib -> native raw dylib. That should be achievable by adding another Rust dylib with a public #[inline] function that in turn calls inline_library_function().

Added this test case.

dpaoliello avatar Oct 21 '22 18:10 dpaoliello

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
Attempting with retry: make prepare
---
tidy: Skipping binary file check, read-only filesystem
Checking which error codes lack tests...
* 632 error codes
* highest error code: E0790
tidy error: /checkout/src/test/run-make/raw-dylib-inline-cross-dylib/lib_wrapper.rs: missing trailing newline
Found 0 error(s) in error codes
Done!
* 387 features
some tidy checks failed

rust-log-analyzer avatar Oct 21 '22 19:10 rust-log-analyzer

Thanks, @dpaoliello! @bors r+

michaelwoerister avatar Oct 24 '22 09:10 michaelwoerister

:pushpin: Commit db52b64b672c489823d760e87faa48a6e33d34cd has been approved by michaelwoerister

It is now in the queue for this repository.

bors avatar Oct 24 '22 09:10 bors

As raw-dylib is stabilized in 1.65, should this be beta backported?

ChrisDenton avatar Oct 24 '22 17:10 ChrisDenton

As raw-dylib is stabilized in 1.65, should this be beta backported?

I think that's a good idea - @michaelwoerister @wesleywiser ?

dpaoliello avatar Oct 24 '22 18:10 dpaoliello

Yeah, I agree. I'm also going to bump the priority on this so it can land prior to Thursday's triage meeting.

@bors p=1

wesleywiser avatar Oct 24 '22 18:10 wesleywiser

:hourglass: Testing commit db52b64b672c489823d760e87faa48a6e33d34cd with merge 5edf6a1ac36d232f1e8be86f64d64bf79e92c9f9...

bors avatar Oct 24 '22 19:10 bors

:broken_heart: Test failed - checks-actions

bors avatar Oct 24 '22 20:10 bors

The job i686-msvc-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
error: make failed
status: exit code: 2
command: "make"
--- stdout -------------------------------
make[1]: Entering directory '/d/a/rust/rust/src/test/run-make/raw-dylib-inline-cross-dylib'
PATH="/d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib:D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin:/c/Program Files (x86)/Windows Kits/10/bin/x64:/c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x86:/d/a/rust/rust/build/i686-pc-windows-msvc/stage0-bootstrap-tools/i686-pc-windows-msvc/release/deps:/d/a/rust/rust/build/i686-pc-windows-msvc/stage0/bin:/d/a/rust/rust/ninja:/d/a/rust/rust/msys2/mingw32/bin:/c/hostedtoolcache/windows/Python/3.10.8/x64/Scripts:/c/hostedtoolcache/windows/Python/3.10.8/x64:/usr/bin:/d/a/rust/rust/sccache:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.9.1/x64:/c/cabal/bin:/c/ghcup/bin:/c/tools/ghc-9.4.2/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.2.1/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/c/Program Files/Git/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.17.13/x64/bin:/c/hostedtoolcache/windows/Python/3.7.9/x64/Scripts:/c/hostedtoolcache/windows/Python/3.7.9/x64:/c/hostedtoolcache/windows/Ruby/2.5.9/x64/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.345-1/x64/bin:/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Eclipse Foundation/jdk-8.0.302.8-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/dotnet:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/160/DTS/Binn:/c/Program Files/OpenSSL/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.6/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/c/Program Files/Git/cmd:/c/Program Files/Git/mingw64/bin:/c/Program Files/Git/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files (x86)/Microsoft BizTalk Server:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps" 'D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin\rustc.exe' --out-dir /d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib -L /d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib  --crate-type dylib --crate-name raw_dylib_test lib.rs -C prefer-dynamic
Some tests failed in compiletest suite=run-make mode=run-make host=i686-pc-windows-msvc target=i686-pc-windows-msvc
PATH="/d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib:D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin:/c/Program Files (x86)/Windows Kits/10/bin/x64:/c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x86:/d/a/rust/rust/build/i686-pc-windows-msvc/stage0-bootstrap-tools/i686-pc-windows-msvc/release/deps:/d/a/rust/rust/build/i686-pc-windows-msvc/stage0/bin:/d/a/rust/rust/ninja:/d/a/rust/rust/msys2/mingw32/bin:/c/hostedtoolcache/windows/Python/3.10.8/x64/Scripts:/c/hostedtoolcache/windows/Python/3.10.8/x64:/usr/bin:/d/a/rust/rust/sccache:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.9.1/x64:/c/cabal/bin:/c/ghcup/bin:/c/tools/ghc-9.4.2/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.2.1/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/c/Program Files/Git/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.17.13/x64/bin:/c/hostedtoolcache/windows/Python/3.7.9/x64/Scripts:/c/hostedtoolcache/windows/Python/3.7.9/x64:/c/hostedtoolcache/windows/Ruby/2.5.9/x64/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.345-1/x64/bin:/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Eclipse Foundation/jdk-8.0.302.8-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/dotnet:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/160/DTS/Binn:/c/Program Files/OpenSSL/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.6/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/c/Program Files/Git/cmd:/c/Program Files/Git/mingw64/bin:/c/Program Files/Git/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files (x86)/Microsoft BizTalk Server:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps" 'D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin\rustc.exe' --out-dir /d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib -L /d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib  --crate-type dylib --crate-name raw_dylib_test_wrapper lib_wrapper.rs -C prefer-dynamic
PATH="/d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib:D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin:/c/Program Files (x86)/Windows Kits/10/bin/x64:/c/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x86:/d/a/rust/rust/build/i686-pc-windows-msvc/stage0-bootstrap-tools/i686-pc-windows-msvc/release/deps:/d/a/rust/rust/build/i686-pc-windows-msvc/stage0/bin:/d/a/rust/rust/ninja:/d/a/rust/rust/msys2/mingw32/bin:/c/hostedtoolcache/windows/Python/3.10.8/x64/Scripts:/c/hostedtoolcache/windows/Python/3.10.8/x64:/usr/bin:/d/a/rust/rust/sccache:/c/Program Files/MongoDB/Server/5.0/bin:/c/aliyun-cli:/c/vcpkg:/c/cf-cli:/c/Program Files (x86)/NSIS:/c/tools/zstd:/c/Program Files/Mercurial:/c/hostedtoolcache/windows/stack/2.9.1/x64:/c/cabal/bin:/c/ghcup/bin:/c/tools/ghc-9.4.2/bin:/c/Program Files/dotnet:/c/mysql/bin:/c/Program Files/R/R-4.2.1/bin/x64:/c/SeleniumWebDrivers/GeckoDriver:/c/Program Files (x86)/sbt/bin:/c/Program Files (x86)/GitHub CLI:/c/Program Files/Git/bin:/c/Program Files (x86)/pipx_bin:/c/npm/prefix:/c/hostedtoolcache/windows/go/1.17.13/x64/bin:/c/hostedtoolcache/windows/Python/3.7.9/x64/Scripts:/c/hostedtoolcache/windows/Python/3.7.9/x64:/c/hostedtoolcache/windows/Ruby/2.5.9/x64/bin:/c/tools/kotlinc/bin:/c/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.345-1/x64/bin:/c/Program Files/ImageMagick-7.1.0-Q16-HDRI:/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/c/ProgramData/kind:/c/Program Files/Eclipse Foundation/jdk-8.0.302.8-hotspot/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/Chocolatey/bin:/c/Program Files/PowerShell/7:/c/Program Files/Microsoft/Web Platform Installer:/c/Program Files/dotnet:/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit:/c/Program Files (x86)/Microsoft SQL Server/110/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/140/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/150/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/160/DTS/Binn:/c/Program Files/OpenSSL/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/chocolatey/lib/pulumi/tools/Pulumi/bin:/c/Program Files/TortoiseSVN/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.8.6/bin:/c/Program Files/Microsoft Service Fabric/bin/Fabric/Fabric.Code:/c/Program Files/Microsoft SDKs/Service Fabric/Tools/ServiceFabricLocalClusterManager:/c/Program Files/nodejs:/c/Program Files/Git/cmd:/c/Program Files/Git/mingw64/bin:/c/Program Files/Git/usr/bin:/c/Program Files/GitHub CLI:/c/tools/php:/c/Program Files (x86)/sbt/bin:/c/SeleniumWebDrivers/ChromeDriver:/c/SeleniumWebDrivers/EdgeDriver:/c/Program Files/Amazon/AWSCLIV2:/c/Program Files/Amazon/SessionManagerPlugin/bin:/c/Program Files/Amazon/AWSSAMCLI/bin:/c/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin:/c/Program Files (x86)/Microsoft BizTalk Server:/c/Program Files/LLVM/bin:/c/Users/runneradmin/.dotnet/tools:/c/Users/runneradmin/.cargo/bin:/c/Users/runneradmin/AppData/Local/Microsoft/WindowsApps" 'D:\a\rust\rust\build\i686-pc-windows-msvc\stage2\bin\rustc.exe' --out-dir /d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib -L /d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib  --crate-type bin driver.rs -L "/d/a/rust/rust/build/i686-pc-windows-msvc/test/run-make/raw-dylib-inline-cross-dylib/raw-dylib-inline-cross-dylib" -C prefer-dynamic
make[1]: Leaving directory '/d/a/rust/rust/src/test/run-make/raw-dylib-inline-cross-dylib'
--- stderr -------------------------------
--- stderr -------------------------------
error[E0658]: link kind `raw-dylib` is unstable on x86
 --> driver.rs:4:34
  |
4 | #[link(name = "extern_2", kind = "raw-dylib")]
  |
  = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
  = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
  = help: add `#![feature(raw_dylib)]` to the crate attributes to enable
error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
make[1]: *** [Makefile:10: all] Error 1
---

test result: FAILED. 43 passed; 1 failed; 27 ignored; 0 measured; 0 filtered out; finished in 9.08s

Build completed unsuccessfully in 1:11:40
make: *** [Makefile:73: ci-subset-1] Error 1

rust-log-analyzer avatar Oct 24 '22 21:10 rust-log-analyzer

Looks like the added test just needs to be updated to account for raw-dylib being unstable on x86.

@bors delegate+

wesleywiser avatar Oct 24 '22 21:10 wesleywiser

:v: @dpaoliello can now approve this pull request

bors avatar Oct 24 '22 21:10 bors

@bors r+

dpaoliello avatar Oct 24 '22 23:10 dpaoliello

:pushpin: Commit 3a1ef50b34d3c88ddc423411be4521499cf9def5 has been approved by dpaoliello

It is now in the queue for this repository.

bors avatar Oct 24 '22 23:10 bors

:hourglass: Testing commit 3a1ef50b34d3c88ddc423411be4521499cf9def5 with merge 31d754a1dfba4d091a05589459708f286d5a231e...

bors avatar Oct 25 '22 04:10 bors

:sunny: Test successful - checks-actions Approved by: dpaoliello Pushing 31d754a1dfba4d091a05589459708f286d5a231e to master...

bors avatar Oct 25 '22 07:10 bors

Finished benchmarking commit (31d754a1dfba4d091a05589459708f286d5a231e): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean[^1] range count[^2]
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean[^1] range count[^2]
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.9% [2.3%, 5.4%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes

rust-timer avatar Oct 25 '22 10:10 rust-timer

discussed in T-compiler meeting today

beta backport approved, with expectation that it will be part of Rust 1.65 that goes out in one week.

@rustbot label: beta-accepted

pnkfelix avatar Oct 27 '22 20:10 pnkfelix