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

make the C part of compiler-builtins opt-out #56435

Merged
merged 2 commits into from
Dec 3, 2018

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Dec 2, 2018

I'd like to be able to use Xargo to build a libstd without having a full C toolchain for the target. This is a start (but the fact that libstd is a dylib is still a problem).

However, compiler_builtin already has somewhat similar logic to not require a C compiler for wasm:

https://github.com/rust-lang-nursery/compiler-builtins/blob/fe74674f6e4be76d47b66f67d529ebf4186f4eb1/build.rs#L36-L41

(WTF GitHub, why doesn't this show an embedded code preview??)

I wonder if there is a way to not have two separate mechanisms? Like, move the above wasm logic to some place that controls the libstd feature, or so? Or is it okay to have these two mechanisms co-exist?

Cc @alexcrichton

@rust-highfive
Copy link
Collaborator

r? @joshtriplett

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 2, 2018
@bjorn3
Copy link
Member

bjorn3 commented Dec 2, 2018

(WTF GitHub, why doesn't this show an embedded code preview??)

I believe it doesn't work cross organization.

@@ -43,9 +43,12 @@ cc = "1.0"
build_helper = { path = "../build_helper" }

[features]
default = ["compiler_builtins_c"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just "compiler_builtins/c" here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because then one cannot enable it from "outside", like in Xargo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Dec 2, 2018

📌 Commit bd20718 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 2, 2018
@alexcrichton
Copy link
Member

@bors: rollup

kennytm added a commit to kennytm/rust that referenced this pull request Dec 3, 2018
…ichton

make the C part of compiler-builtins opt-out

I'd like to be able to use Xargo to build a libstd without having a full C toolchain for the target.  This is a start (but the fact that libstd is a dylib is still a problem).

However, compiler_builtin already has somewhat similar logic to not require a C compiler for wasm:

https://github.com/rust-lang-nursery/compiler-builtins/blob/fe74674f6e4be76d47b66f67d529ebf4186f4eb1/build.rs#L36-L41

(WTF GitHub, why doesn't this show an embedded code preview??)

I wonder if there is a way to not have two separate mechanisms? Like, move the above wasm logic to some place that controls the libstd feature, or so? Or is it okay to have these two mechanisms co-exist?

Cc @alexcrichton
bors added a commit that referenced this pull request Dec 3, 2018
Rollup of 13 pull requests

Successful merges:

 - #56141 ([std] Osstr len clarity)
 - #56366 (Stabilize self_in_typedefs feature)
 - #56395 (Stabilize dbg!(...))
 - #56401 (Move VecDeque::resize_with out of the impl<T:Clone> block)
 - #56402 (Improve the unstable book example for #[marker] trait)
 - #56412 (Update tracking issue for `extern_crate_self`)
 - #56416 (Remove unneeded body class selector)
 - #56418 (Fix failing tidy (line endings on Windows))
 - #56419 (Remove some uses of try!)
 - #56432 (Update issue number of `shrink_to` methods to point the tracking issue)
 - #56433 (Add description about `crate` for parse_visibility's comment)
 - #56435 (make the C part of compiler-builtins opt-out)
 - #56438 (Remove not used `DotEq` token)

Failed merges:

r? @ghost
@bors bors merged commit bd20718 into rust-lang:master Dec 3, 2018
@RalfJung RalfJung deleted the libstd-without-c branch January 9, 2019 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants