On 02/20/2014 12:06 PM, Jordan Rose wrote:
> Nice catch. What made you decide to do this rather than change AddLLVM.cmake?

AFAICT this approach uses the AddLLVM APIs as designed.  They already
know not to install targets when EXCLUDE_FROM_ALL is enabled but were
not told about the setting in this case within Clang.

Those APIs test for a variable setting:

 if( EXCLUDE_FROM_ALL )

Some of them set it using hard-coded knowledge of internal LLVM
options:

  if( NOT LLVM_BUILD_EXAMPLES )
    set(EXCLUDE_FROM_ALL ON)
  endif()

to avoid requiring call sites inside LLVM's own code to set it.
Since LLVM APIs cannot encode knowledge of all consumers, such as
CLANG_BUILD_EXAMPLES, the consumers need to set EXCLUDE_FROM_ALL
instead.

-Brad

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to