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

Weed out dependencies on librustc_llvm and librustc. #32571

Merged
merged 3 commits into from
Mar 30, 2016

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Mar 29, 2016

Found while working on #32570. cc @nikomatsakis

@eddyb
Copy link
Member Author

eddyb commented Mar 29, 2016

@oli-obk Was there a specific reason rustc_const_eval ended up in TARGET_CRATES? Don't want to break anything with this change.

@oli-obk
Copy link
Contributor

oli-obk commented Mar 29, 2016

I was sure it was needed at some point, but I don't remember why.
Probably I misunderstood something about how staging and
plugin-unit-tests work.

I don't see why it should be there.

Am 29.03.2016 um 12:56 schrieb Eduard-Mihai Burtescu:

@oli-obk https://github.com/oli-obk Was there a specific reason
|rustc_const_eval| ended up in |TARGET_CRATES|? Don't want to break
anything with this change.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#32571 (comment)

@arielb1
Copy link
Contributor

arielb1 commented Mar 29, 2016

This breaks the execution-engine test:

test.rs:31:5: 31:16 error: unresolved import `rustc::llvm`. There is no `llvm` in `rustc` [E0432]
test.rs:31 use rustc::llvm;
               ^~~~~~~~~~~
test.rs:31:5: 31:16 help: run `rustc --explain E0432` to see a detailed explanation
test.rs:105:12: 105:24 error: the type of this value must be known in this context
test.rs:105         if ee.is_null() {
                       ^~~~~~~~~~~~
test.rs:100:21: 100:25 error: the trait `core::marker::Sized` is not implemented for the type `[std::path::PathBuf]` [E0277]
test.rs:100         let (llmod, deps) = compile_program(program, sysroot.clone())
                                ^~~~
test.rs:100:21: 100:25 help: run `rustc --explain E0277` to see a detailed explanation
test.rs:100:21: 100:25 note: `[std::path::PathBuf]` does not have a constant size known at compile-time
test.rs:100:21: 100:25 note: all local variables must have a statically known size
test.rs:120:21: 120:25 error: the trait `core::marker::Sized` is not implemented for the type `[std::path::PathBuf]` [E0277]
test.rs:120         let (llmod, deps) = compile_program(program, self.sysroot.clone())
                                ^~~~
test.rs:120:21: 120:25 help: run `rustc --explain E0277` to see a detailed explanation
test.rs:120:21: 120:25 note: `[std::path::PathBuf]` does not have a constant size known at compile-time
test.rs:120:21: 120:25 note: all local variables must have a statically known size
test.rs:136:17: 136:29 error: the type of this value must be known in this context
test.rs:136             if !fv.is_null() {
                            ^~~~~~~~~~~~
test.rs:139:26: 139:38 error: the type of this value must be known in this context
test.rs:139                 assert!(!fp.is_null());
                                     ^~~~~~~~~~~~
test.rs:139:17: 139:40 note: in this expansion of assert! (defined in <std macros>)
test.rs:153:17: 153:29 error: the type of this value must be known in this context
test.rs:153             if !gv.is_null() {
                            ^~~~~~~~~~~~
test.rs:156:26: 156:38 error: the type of this value must be known in this context
test.rs:156                 assert!(!gp.is_null());
                                     ^~~~~~~~~~~~
test.rs:156:17: 156:40 note: in this expansion of assert! (defined in <std macros>)
error: aborting due to 7 previous errors

Try to add a extern crate rustc_llvm

@alexcrichton
Copy link
Member

r=me once this is passing, thanks @eddyb!

@@ -166,6 +166,10 @@ pub fn run_compiler<'a>(args: &[String],

let sopts = config::build_session_options(&matches);

if sopts.debugging_opts.debug_llvm {
Copy link
Member

Choose a reason for hiding this comment

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

Could be moved all the way to phase 3 I think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just in case something is touching LLVM before then, I didn't want to change behavior.

@eddyb
Copy link
Member Author

eddyb commented Mar 29, 2016

@arielb1 Heh, I put this up to get some thoughts and didn't get to make sure everything compiles, thanks!

@eddyb eddyb force-pushed the llvm-back-to-back branch from ceed9a0 to f22ec29 Compare March 29, 2016 16:36
@eddyb
Copy link
Member Author

eddyb commented Mar 29, 2016

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Mar 29, 2016

📌 Commit f22ec29 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Mar 29, 2016

⌛ Testing commit f22ec29 with merge ec666a5...

bors added a commit that referenced this pull request Mar 29, 2016
Weed out dependencies on librustc_llvm and librustc.

Found while working on #32570. cc @nikomatsakis
@bors bors merged commit f22ec29 into rust-lang:master Mar 30, 2016
@eddyb eddyb deleted the llvm-back-to-back branch March 30, 2016 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants