Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

passthrough LLVM_DIR to unit tests external project #131

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

arhag
Copy link
Contributor

@arhag arhag commented Nov 27, 2018

Eosio has a dependency on LLVM 4.0. On Mac, when installed with brew, LLVM 4.0 is installed as a keg-only and so it does not link files outside of /usr/local/opt to avoid overwriting over system files. However, older version of the eosio build script did a force link which did overwrite the system files, but also made the CMake find_package of LLVM 4.0 to work.

In the v1.4.4 release of eosio, a change to EosioTester.cmake was added to set LLVM_DIR, assuming it was not already set, on Macs (Linux already did not have this issue) to the standard path that brew would install it to. This allowed for eosio to build as well as any projects depending on eosio (like eosio.contracts) to build, even if no brew force link was done to overwrite the system files with LLVM 4.0 files.

When building with an eosio version older than v1.4.4 in a Mac environment that has not overwritten the LLVM files, an explicit path to lib/cmake/llvm directory within the LLVM root must be provided to successfully build. The same goes for building the unit tests of eosio.contracts.

However, since the unit tests are an external CMake project, the variables defined on the command line of the cmake command do not by default pass through to the external project. So this PR makes changes to UnitTestExternalProject.txt to explicitly pass through the LLVM_DIR variable to the unit test external project.

@arhag arhag merged commit 4969bc0 into release/1.4.x Nov 27, 2018
@arhag arhag deleted the passthrough-llvm branch November 27, 2018 18:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant