Skip to content
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

Limit dylib symbols #59752

Merged
merged 3 commits into from Jun 15, 2019

Conversation

Projects
None yet
@Zoxc
Copy link
Contributor

commented Apr 6, 2019

This makes windows-gnu match the behavior of windows-msvc. It probably doesn't make sense to export these symbols on other platforms either.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 6, 2019

r? @matthewjasper

(rust_highfive has picked a reviewer for you, use r? to override)

@matthewjasper

This comment has been minimized.

Copy link
Contributor

commented Apr 6, 2019

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

commented Apr 6, 2019

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Note: This should fix issue #53014. Before I approve, I want to discuss the problem some more in that issue in order to make sure we know what exactly is going on.

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

⌛️ Trying commit 2f948ea with merge d8873bf...

bors added a commit that referenced this pull request Apr 8, 2019

Auto merge of #59752 - Zoxc:dylib-fix, r=<try>
Limit dylib symbols

This makes `windows-gnu` match the behavior of `windows-msvc`. It probably doesn't make sense to export these symbols on other platforms either.
@Zoxc

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

@michaelwoerister That issue is for msvc, which isn't affected by this PR.

@pnkfelix

This comment has been minimized.

Copy link
Member

commented Apr 8, 2019

Note: This should fix issue #53014. Before I approve, I want to discuss the problem some more in that issue in order to make sure we know what exactly is going on.

I'm confused: This code only changes a method in impl<'a> Linker for GccLinker<'a>; but the reports in issue #53014 say that the problem is arising under MSVC. I would have thought that the former would have nothing to do with the latter.

Am I misunderstanding the relationship between the GccLinker type and the MSVC target?

Update: Ah, @Zoxc pointed out the same detail.

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Ah OK. So this is just a drive-by bug fix?

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

Ran into it when reviving #56987.

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Well, I guess there's no harm in passing the list of exported symbols to the linker explicitly then. Although there's still the question why it makes a difference (as mentioned in #53014 (comment)).

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

And I wonder if we can also remove the early exit for proc-macros. IIRC, they should only export no_mangle functions.

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

☀️ Try build successful - checks-travis
Build commit: d8873bf

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

@rust-timer

This comment has been minimized.

Copy link

commented Apr 8, 2019

Success: Queued d8873bf with parent 3750348, comparison URL.

@rust-timer

This comment has been minimized.

Copy link

commented Apr 8, 2019

Finished benchmarking try commit d8873bf

@michaelwoerister

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

Looks pretty good! I know @alexcrichton already found in the past that dynamic linking can take up quite a bit of time when compiling small crates.

You can r=me in the current state or try out things with proc-macro early exit also removed.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 8, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:03d0faf2:start=1554735105860439897,finish=1554735209490245048,duration=103629805151
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Zoxc Zoxc force-pushed the Zoxc:dylib-fix branch from 5848644 to 2f948ea Apr 8, 2019

@Zoxc

This comment has been minimized.

Copy link
Contributor Author

commented Apr 8, 2019

I wasn't expecting that error, maybe we ignore a proc macro without the right symbols exported?

Anyway, @bors r=michaelwoerister

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2019

📌 Commit 2f948ea has been approved by michaelwoerister

Centril added a commit to Centril/rust that referenced this pull request Apr 8, 2019

Rollup merge of rust-lang#59752 - Zoxc:dylib-fix, r=michaelwoerister
Limit dylib symbols

This makes `windows-gnu` match the behavior of `windows-msvc`. It probably doesn't make sense to export these symbols on other platforms either.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 15, 2019

The job x86_64-apple of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:03:19]       Memory: 8 GB
[00:03:19]       Boot ROM Version: VMW71.00V.7581552.B64.1801142334
[00:03:19]       Apple ROM Info: [MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]Welcome to the Virtual Machine
[00:03:19]       SMC Version (system): 2.8f0
[00:03:19]       Serial Number (system): VMb2tpkTXEUp
[00:03:19] 
[00:03:19] hw.ncpu: 4
[00:03:19] hw.byteorder: 1234
[00:03:19] hw.memsize: 8589934592
---
[00:09:40] [RUSTC-TIMING] rustc_errors test:false 11.423
[00:09:49] [RUSTC-TIMING] rustc_target test:false 20.163
[00:11:09] [RUSTC-TIMING] syntax test:false 79.954
[00:11:09]    Compiling syntax_ext v0.0.0 (/Users/travis/build/rust-lang/rust/src/libsyntax_ext)
No output has been received in the last 30m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@pietroalbini

This comment has been minimized.

Copy link
Member

commented Jun 15, 2019

@bors retry

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

⌛️ Testing commit f8f9a28 with merge dbebcee...

bors added a commit that referenced this pull request Jun 15, 2019

Auto merge of #59752 - Zoxc:dylib-fix, r=alexcrichton
Limit dylib symbols

This makes `windows-gnu` match the behavior of `windows-msvc`. It probably doesn't make sense to export these symbols on other platforms either.
@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: alexcrichton
Pushing dbebcee to master...

@bors bors added the merged-by-bors label Jun 15, 2019

@bors bors merged commit f8f9a28 into rust-lang:master Jun 15, 2019

2 of 3 checks passed

pr Build #20190612.40 failed
Details
Travis CI - Pull Request Build Passed
Details
homu Test successful
Details
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 15, 2019

📣 Toolstate changed by #59752!

Tested on commit dbebcee.
Direct link to PR: #59752

💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jun 15, 2019

📣 Toolstate changed by rust-lang/rust#59752!
Tested on commit rust-lang/rust@dbebcee.
Direct link to PR: <rust-lang/rust#59752>

💔 rls on linux: test-pass → test-fail (cc @Xanewok, @rust-lang/infra).

@Zoxc Zoxc deleted the Zoxc:dylib-fix branch Jun 15, 2019

@lzutao

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

Is this beta-nominated? #59800 would need them.

@pnkfelix

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

discussed in T-compiler meeting; accepting for beta backport.

bors added a commit that referenced this pull request Jun 22, 2019

Auto merge of #62065 - pietroalbini:beta-rollup, r=pietroalbini
[beta] Rollup backports

Rolled up:

* [beta] Comment out dev key #61700

Cherry picked:

* Limit dylib symbols #59752
* Dont ICE on an attempt to use GAT without feature gate #61118
* Fix cfg(test) build for x86_64-fortanix-unknown-sgx #61503
* Handle index out of bound errors during const eval without panic #61598
* Hygienize macros in the standard library #61629
* Fix ICE involving mut references #61947

r? @ghost
@Centril

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

Discussed at the T-release meeting. @Mark-Simulacrum would be happy to r+ a PR that adds a note to the "known issues" section of the relnotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.