[llvm] r334543 - Fix how LLVMOPTIONALCOMPONENTS is passed to llvm-build

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 11:56:42 PDT 2018


Thanks for the revert. I agree, it did look quoted correctly, but I figured
this was a workaround for some platform with busted quoting rules.

I don't see why passing an empty argument enables building the intel jit
events library, but I have no interest in investigating it.

On Tue, Jun 12, 2018 at 7:23 PM Ahmed Bougacha <ahmed.bougacha at gmail.com>
wrote:

> Hey folks,
>
> I reverted this in r334566.  My understanding is, this is intended to
> make the llvm-build invocation have a correct
> "--enable-optional-components" value, but:
>
> - it already has a value: it's quoted in the command line a few lines
> below, and, if I hack llvm-build to print sys.argv, it does look
> correct:
>     -- llvm-build output: ['.../utils/llvm-build/llvm-build',
> '--native-target', 'X86', '--enable-targets', 'X86;ARM;AArch64',
> '--enable-optional-components', '', '--write-library-table',
> '.../build/tools/llvm-config/LibraryDependencies.inc',
> '--write-cmake-fragment', '.../build/LLVMBuild.cmake']
>
> - the " " string seems to evaluate to TRUE in CMake (*sigh*), so this
> basically force-enables LLVM_USE_INTEL_JITEVENTS, regardless of the
> value of the option.  On Darwin, JITEvents is not supported, so this
> bypasses that OS check but is guaranteed to fail later.
>
> If #1 is wrong, this was probably meant to set LLVMOPTIONALCOMPONENTS, I
> guess.
> -Ahmed
>
>
> On Tue, Jun 12, 2018 at 1:53 PM, Reid Kleckner via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: rnk
> > Date: Tue Jun 12 13:53:46 2018
> > New Revision: 334543
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=334543&view=rev
> > Log:
> > Fix how LLVMOPTIONALCOMPONENTS is passed to llvm-build
> >
> > Patch by Force.Charlie-I
> >
> > If LLVM_USE_INTEL_JITEVENTS and LLVM_USE_OPROFILE  not set,
> > "${LLVMOPTIONALCOMPONENTS}" is empty, but
> > **--enable-optional-components** need arg, Cause
> > **--write-library-table** to be skipped parsed.
> >
> > Differential Revision: https://reviews.llvm.org/D47982
> >
> > Modified:
> >     llvm/trunk/CMakeLists.txt
> >
> > Modified: llvm/trunk/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=334543&r1=334542&r2=334543&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/CMakeLists.txt (original)
> > +++ llvm/trunk/CMakeLists.txt Tue Jun 12 13:53:46 2018
> > @@ -640,6 +640,7 @@ set(LLVMBUILDCMAKEFRAG
> >    "${LLVM_BINARY_DIR}/LLVMBuild.cmake")
> >
> >  # Create the list of optional components that are enabled
> > +set(LLVM_USE_INTEL_JITEVENTS " ")
> >  if (LLVM_USE_INTEL_JITEVENTS)
> >    set(LLVMOPTIONALCOMPONENTS IntelJITEvents)
> >  endif (LLVM_USE_INTEL_JITEVENTS)
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180613/4f74a39d/attachment.html>


More information about the llvm-commits mailing list