[PATCH] D72327: Fix compiler extension builds

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 12:58:49 PST 2020


serge-sans-paille added a comment.

In D72327#1808263 <https://reviews.llvm.org/D72327#1808263>, @fhahn wrote:

> Does this fix `llvm/test/Feature/load_extension.ll` on macOS by any chance?


Now it should, but I'm waiting for my pre-commit validation to state if that's actually the case.



================
Comment at: llvm/examples/Bye/CMakeLists.txt:1
-add_llvm_pass_plugin(Bye
+if(LLVM_BUILD_EXAMPLES)
+  add_llvm_pass_plugin(Bye
----------------
Meinersbur wrote:
> [serious] Whether example targets are generated is controlled by `LLVM_INCLUDE_EXAMPLES`. `LLVM_BUILD_EXAMPLES` should control `EXCLUDE_FROM_ALL` or similar. Is there a corresponding option for pass plugins, especially if `LLVM_BYE_LINK_INTO_TOOLS` is off?
> 
> I'd assume that if `LLVM_BUILD_EXAMPLES` is off, but `LLVM_BYE_LINK_INTO_TOOLS` is on, that latter would effectively override `EXCLUDE_FROM_ALL` since the plugin is needed to built opt,bugpoint,etc.
> 
> Btw, what is the "Fix validation issue when building examples"?
> I'd assume that if LLVM_BUILD_EXAMPLES is off, but LLVM_BYE_LINK_INTO_TOOLS is on, that latter would effectively override EXCLUDE_FROM_ALL since the plugin is needed to built opt,bugpoint,etc.

The problem I wanted to solve here is having LLVM_BYE_LINK_INTO_TOOLS=ON in release build, because Bye is just an example library. But it's nice to be able to test it. Maybe I should just issue a warning in that case?

> Btw, what is the "Fix validation issue when building examples"?

There was a mismatch between the lit feature « requires build_example » and « LLVM_BUILD_EXAMPLES » I've updated the patch in that aspect, taking into account your remark.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72327/new/

https://reviews.llvm.org/D72327





More information about the llvm-commits mailing list