This is an archive of the discontinued LLVM Phabricator instance.

build: remove use of llvm-config
Needs ReviewPublic

Authored by compnerd on Jan 29 2019, 11:12 AM.

Details

Reviewers
chandlerc
rnk
Summary

Update the CMake build to use the LLVM CMake Config package rather than invoking llvm-config to find the parameters. Users can specify -DLLVM_DIR= to CMake to indicate where the LLVM build is (as opposed to -DLLVM_CONFIG=. For uses where the system provides LLVM or LLVM's build output is in the CMake search path, no parameters are necessary. This removes use of llvm-config which is helpful on the path to removing llvm-config from LLVM.

Diff Detail

Repository
rC Clang

Event Timeline

compnerd created this revision.Jan 29 2019, 11:12 AM

Will overriding LLVM_BUILD_MAIN_SRC_DIR work? Gentoo relies on being able to provide sources in another directory since all builds are done in isolated temporary directories.

@mgorny, no, you should specify -DLLVM_DIR=/path/to/where/the/config/lives instead.

I don't think that's going to work on top of unconfigured sources.

Could you please update this to match the LLD version?

Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2019, 12:04 AM