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

Enable Control Flow Guard in rustbuild #68824

Merged
merged 1 commit into from Feb 11, 2020
Merged

Conversation

@ajpaverd
Copy link
Contributor

ajpaverd commented Feb 4, 2020

Now that Rust supports Control Flow Guard (#68180), add a config.toml option to build the standard library with CFG enabled.

r? @nagisa

@nagisa

This comment has been minimized.

Copy link
Contributor

nagisa commented Feb 4, 2020

@bors r+ option disabled by default, no danger in adding it.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 4, 2020

📌 Commit ede8019 has been approved by nagisa

@ajpaverd

This comment has been minimized.

Copy link
Contributor Author

ajpaverd commented Feb 4, 2020

Thanks for the super fast review @nagisa!

src/bootstrap/builder.rs Outdated Show resolved Hide resolved
src/bootstrap/builder.rs Outdated Show resolved Hide resolved
@nagisa

This comment has been minimized.

Copy link
Contributor

nagisa commented Feb 4, 2020

@bors r- on commentary above.

r? @Mark-Simulacrum

@nikic

This comment has been minimized.

Copy link
Contributor

nikic commented Feb 4, 2020

Isn't this something that should be happening through -Z build-std, similar to how it is (since recently) done for sanitizer builds?

@ajpaverd

This comment has been minimized.

Copy link
Contributor Author

ajpaverd commented Feb 5, 2020

Isn't this something that should be happening through -Z build-std, similar to how it is (since recently) done for sanitizer builds?

Thanks for the suggestion @nikic - I hadn't seen -Z build-std. Did I understand correctly that this approach would not require changes to rustbuild (i.e. libstd would be rebuilt with Control Flow Guard enabled when the -Z control_flow_guard flag was set for rustc)?

On the other hand, is there some way to avoid rebuilding libstd every time and always use the same version (with Control Flow Guard enabled)?

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Feb 10, 2020

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2020-02-10T14:49:03.6652346Z ========================== Starting Command Output ===========================
2020-02-10T14:49:03.6669792Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/135719e1-3aa1-4232-8b1b-2e2177705451.sh
2020-02-10T14:49:03.6869039Z 
2020-02-10T14:49:03.6928806Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-10T14:49:03.6934348Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/68824/merge to s
2020-02-10T14:49:03.6936203Z Task         : Get sources
2020-02-10T14:49:03.6936233Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-10T14:49:03.6936280Z Version      : 1.0.0
2020-02-10T14:49:03.6936310Z Author       : Microsoft
---
2020-02-10T14:49:04.5516567Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-10T14:49:04.5604040Z ##[command]git config gc.auto 0
2020-02-10T14:49:04.5683988Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-10T14:49:04.5781797Z ##[command]git config --get-all http.proxy
2020-02-10T14:49:04.5922275Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/68824/merge:refs/remotes/pull/68824/merge

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)

Copy link
Member

Mark-Simulacrum left a comment

r=me with comment resolved

src/bootstrap/builder.rs Show resolved Hide resolved
@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Feb 10, 2020

Please also squash the commits, forgot to mention that in my previous comment.

@ajpaverd ajpaverd force-pushed the ajpaverd:cfguard-rustbuild branch from d4f838a to 87df124 Feb 10, 2020
@Mark-Simulacrum

This comment has been minimized.

Copy link
Member

Mark-Simulacrum commented Feb 10, 2020

@bors r+

@ajpaverd

This comment has been minimized.

Copy link
Contributor Author

ajpaverd commented Feb 11, 2020

Thanks @Mark-Simulacrum! Is bors still waiting for me to do something here?

@nikic

This comment has been minimized.

Copy link
Contributor

nikic commented Feb 11, 2020

@bors r=Mark-Simulacrum

Looks like bors just missed this.

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 11, 2020

📌 Commit 87df124 has been approved by Mark-Simulacrum

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Feb 11, 2020
…Simulacrum

Enable Control Flow Guard in rustbuild

Now that Rust supports Control Flow Guard (rust-lang#68180), add a config.toml option to build the standard library with CFG enabled.

r? @nagisa
bors added a commit that referenced this pull request Feb 11, 2020
Rollup of 8 pull requests

Successful merges:

 - #66498 (Remove unused feature gates)
 - #68816 (Tweak borrow error on `FnMut` when `Fn` is expected)
 - #68824 (Enable Control Flow Guard in rustbuild)
 - #69022 (traits: preallocate 2 Vecs of known initial size)
 - #69031 (Use `dyn Trait` more in tests)
 - #69044 (Don't run coherence twice for future-compat lints)
 - #69047 (Don't rustfmt check the vendor directory.)
 - #69055 (Clean up E0307 explanation)

Failed merges:

r? @ghost
@bors bors merged commit 87df124 into rust-lang:master Feb 11, 2020
4 checks passed
4 checks passed
pr Build #20200210.55 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.