Closed
Description
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.
Metadata
Metadata
Assignees
Labels
Category: PRs that clean code up or issues documenting cleanup.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the infrastructure team, which will review and decide on the PR/issue.