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

rustbuild: Use src/rustc for assembled compilers #38076

Merged
merged 1 commit into from
Dec 8, 2016

Conversation

alexcrichton
Copy link
Member

The src/rustc path is intended for assembling a compiler (e.g. the bare bones)
not actually compiling the whole compiler itself. This path was accidentally
getting hijacked to represent the whole compiler being compiled, so let's
redirect that elsewhere for that particular cargo project.

Closes #38039

The `src/rustc` path is intended for assembling a compiler (e.g. the bare bones)
not actually compiling the whole compiler itself. This path was accidentally
getting hijacked to represent the whole compiler being compiled, so let's
redirect that elsewhere for that particular cargo project.

Closes rust-lang#38039
@rust-highfive
Copy link
Collaborator

r? @brson

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

@japaric
Copy link
Member

japaric commented Nov 30, 2016

With this and #38050, following the repro steps in #38039 (comment) results in rustbuild doing no work:

$ nice $SRC_DIR/x.py build --stage 1 src/rustc --host=$HOST
    Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
Synchronizing submodule url for 'src/compiler-rt'
Synchronizing submodule url for 'src/jemalloc'
Synchronizing submodule url for 'src/liblibc'
Synchronizing submodule url for 'src/llvm'
Synchronizing submodule url for 'src/rt/hoedown'
Synchronizing submodule url for 'src/rust-installer'
HEAD is now at a8fc4c1 Merge pull request #28 from xen0n/preprocessor-firefighting
HEAD is now at e058ca6 Change how the default zone is found
HEAD is now at 6e8c1b4 Merge pull request #446 from alexcrichton/link-cfg
HEAD is now at c1d9622 Backport r285278 [ARM] Predicate UMAAL selection on hasDSP.
HEAD is now at a3736a0 Merge pull request #6 from intelfx/patch-1
HEAD is now at 4f99485 Merge pull request #54 from brson/docdir
Build completed in 0:00:02

$ tree -d build/
build/
|-- bootstrap
|   `-- debug
|       |-- build
|       |-- deps
|       |-- examples
|       `-- native
|-- cache
|   |-- 2016-09-26
|   `-- 2016-09-28
`-- x86_64-unknown-linux-gnu
    `-- stage0
        |-- bin
        |-- etc
        |   `-- bash_completion.d
        |-- lib
        |   |-- cargo
        |   `-- rustlib
        |       |-- etc
        |       `-- x86_64-unknown-linux-gnu
        |           |-- bin
        |           `-- lib
        `-- share
            |-- doc
            |   |-- cargo
            |   `-- rust
            |-- man
            |   `-- man1
            `-- zsh
                `-- site-functions

29 directories

(I haven't tried this PR in isolation)

@japaric
Copy link
Member

japaric commented Nov 30, 2016

(I haven't tried this PR in isolation)

Tested. Same problem.

@alexcrichton
Copy link
Member Author

@japaric oh I believe this needs #37800 as well

@alexcrichton
Copy link
Member Author

er #37817

@japaric
Copy link
Member

japaric commented Dec 1, 2016

OK. Tested again this + #37817. Using the repro instructions in #38039 (comment), now I get:

$ nice $SRC_DIR/x.py build --stage 1 src/rustc --host=$HOST
Building LLVM for x86_64-unknown-linux-gnu
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> arm-unknown-linux-gnueabi)
Building stage0 test artifacts (x86_64-unknown-linux-gnu -> arm-unknown-linux-gnueabi)
Building LLVM for arm-unknown-linux-gnueabi
Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> arm-unknown-linux-gnueabi)

Which is better but the stage numbering seems strange:

Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> arm-unknown-linux-gnueabi)

Is this using the "snapshot" (the stage0 compiler) to build the ARM compiler? Or is it using the compiler produced by this step:

Building stage0 compiler artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

? If the former then that ^ step (or rather, the first 4 steps) wouldn't be necessary right?

EDIT: Fixed the x.py command

@alexcrichton
Copy link
Member Author

Had some discussion with @japaric on IRC, and the conclusion was that if the command switches --host to --target everything works as expected, so yay!

@japaric
Copy link
Member

japaric commented Dec 3, 2016

r=me after #37817 lands

@japaric
Copy link
Member

japaric commented Dec 7, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Dec 7, 2016

📌 Commit 8e9f7f5 has been approved by japaric

@bors
Copy link
Contributor

bors commented Dec 8, 2016

⌛ Testing commit 8e9f7f5 with merge d9aae63...

bors added a commit that referenced this pull request Dec 8, 2016
rustbuild: Use src/rustc for assembled compilers

The `src/rustc` path is intended for assembling a compiler (e.g. the bare bones)
not actually compiling the whole compiler itself. This path was accidentally
getting hijacked to represent the whole compiler being compiled, so let's
redirect that elsewhere for that particular cargo project.

Closes #38039
@bors bors merged commit 8e9f7f5 into rust-lang:master Dec 8, 2016
@alexcrichton alexcrichton deleted the another-rustbuild-bug branch December 19, 2016 20:45
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.

5 participants