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

./x.py clean does not clean LLVM, ./x.py clean -h looks wrong #44214

Closed
SimonSapin opened this issue Aug 31, 2017 · 4 comments
Closed

./x.py clean does not clean LLVM, ./x.py clean -h looks wrong #44214

SimonSapin opened this issue Aug 31, 2017 · 4 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

In a clone of this repository that I hadn’t used for a long time, I ran git pull then ./x.py build. The latter failed in the middle of building LLVM with:

[ 15%] Linking CXX executable ../../bin/llvm-config
/usr/bin/ld: cannot find -lLLVM
collect2: error: ld returned 1 exit status
[ 15%] Linking CXX executable ../../bin/llvm-cxxfilt
tools/llvm-config/CMakeFiles/llvm-config.dir/build.make:95: recipe for target 'bin/llvm-config' failed
make[2]: *** [bin/llvm-config] Error 1
CMakeFiles/Makefile2:11680: recipe for target 'tools/llvm-config/CMakeFiles/llvm-config.dir/all' failed
make[1]: *** [tools/llvm-config/CMakeFiles/llvm-config.dir/all] Error 2

Running ./x.py clean and then ./x.py build again did not help. It turns out that ./x.py clean does not clean build/x86_64-unknown-linux-gnu/llvm/build. Removing everything with rm -r build/* "fixed" the issue.

I tried ./x.py clean -h to see if there’s an option to clean everything, but the output of that is confusing. It looks like the help message for ./x.py without any subcommand.

Updating submodules
    Finished dev [unoptimized] target(s) in 0.0 secs
Usage: x.py <subcommand> [options] [<paths>...]

Subcommands:
    build       Compile either the compiler or libraries
    test        Build and run some test suites
    bench       Build and run some benchmarks
    doc         Build documentation
    clean       Clean out build directories
    dist        Build distribution artifacts
    install     Install distribution artifacts

To learn more about a subcommand, run `./x.py <subcommand> -h`

Options:
    -v, --verbose       use verbose output (-vv for very verbose)
    -i, --incremental   use incremental compilation
        --config FILE   TOML configuration file for build
        --build BUILD   build target of the stage0 compiler
        --host HOST     host targets to build
        --target TARGET target targets to build
        --on-fail CMD   command to run on failure
        --stage N       stage to build
        --keep-stage N  stage to keep without recompiling
        --src DIR       path to the root of the rust checkout
    -j, --jobs JOBS     number of jobs to run in parallel
    -h, --help          print this help message

Run `./x.py clean -h -v` to see a list of available paths.
@Mark-Simulacrum Mark-Simulacrum added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 31, 2017
@Mark-Simulacrum
Copy link
Member

I believe this is intentional; the help output could use work. @alexcrichton Is it worth cleaning LLVM as well? I doubt it'd be too helpful in most cases...

@SimonSapin
Copy link
Contributor Author

Even if it’s not the default, there should be some way to do clean everything. (And the not-everything behavior should be documented.)

@alexcrichton
Copy link
Member

At this point this is just a historical artifact of how the bots used to work because we didn't want make clean to clean out the LLVM build directory. That doesn't actually matter any more so I think it'd be fine to update make clean to basically rm -rf build

@shepmaster shepmaster added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Sep 1, 2017
@Mark-Simulacrum Mark-Simulacrum added this to the impl period milestone Sep 15, 2017
@aturon aturon removed this from the impl period milestone Sep 15, 2017
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Sep 17, 2017

It should be sufficient to change this function to remove build.out and tmp and remove the existing logic within it.

@Mark-Simulacrum Mark-Simulacrum added the E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. label Sep 17, 2017
@bors bors closed this as completed in 6bc8ca0 Sep 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants