<div dir="ltr">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.<div><br></div><div>I don't see why passing an empty argument enables building the intel jit events library, but I have no interest in investigating it.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 12, 2018 at 7:23 PM Ahmed Bougacha <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey folks,<br>
<br>
I reverted this in r334566. My understanding is, this is intended to<br>
make the llvm-build invocation have a correct<br>
"--enable-optional-components" value, but:<br>
<br>
- it already has a value: it's quoted in the command line a few lines<br>
below, and, if I hack llvm-build to print sys.argv, it does look<br>
correct:<br>
-- llvm-build output: ['.../utils/llvm-build/llvm-build',<br>
'--native-target', 'X86', '--enable-targets', 'X86;ARM;AArch64',<br>
'--enable-optional-components', '', '--write-library-table',<br>
'.../build/tools/llvm-config/LibraryDependencies.inc',<br>
'--write-cmake-fragment', '.../build/LLVMBuild.cmake']<br>
<br>
- the " " string seems to evaluate to TRUE in CMake (*sigh*), so this<br>
basically force-enables LLVM_USE_INTEL_JITEVENTS, regardless of the<br>
value of the option. On Darwin, JITEvents is not supported, so this<br>
bypasses that OS check but is guaranteed to fail later.<br>
<br>
If #1 is wrong, this was probably meant to set LLVMOPTIONALCOMPONENTS, I guess.<br>
-Ahmed<br>
<br>
<br>
On Tue, Jun 12, 2018 at 1:53 PM, Reid Kleckner via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: rnk<br>
> Date: Tue Jun 12 13:53:46 2018<br>
> New Revision: 334543<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=334543&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=334543&view=rev</a><br>
> Log:<br>
> Fix how LLVMOPTIONALCOMPONENTS is passed to llvm-build<br>
><br>
> Patch by Force.Charlie-I<br>
><br>
> If LLVM_USE_INTEL_JITEVENTS and LLVM_USE_OPROFILE not set,<br>
> "${LLVMOPTIONALCOMPONENTS}" is empty, but<br>
> **--enable-optional-components** need arg, Cause<br>
> **--write-library-table** to be skipped parsed.<br>
><br>
> Differential Revision: <a href="https://reviews.llvm.org/D47982" rel="noreferrer" target="_blank">https://reviews.llvm.org/D47982</a><br>
><br>
> Modified:<br>
> llvm/trunk/CMakeLists.txt<br>
><br>
> Modified: llvm/trunk/CMakeLists.txt<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=334543&r1=334542&r2=334543&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=334543&r1=334542&r2=334543&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/CMakeLists.txt (original)<br>
> +++ llvm/trunk/CMakeLists.txt Tue Jun 12 13:53:46 2018<br>
> @@ -640,6 +640,7 @@ set(LLVMBUILDCMAKEFRAG<br>
> "${LLVM_BINARY_DIR}/LLVMBuild.cmake")<br>
><br>
> # Create the list of optional components that are enabled<br>
> +set(LLVM_USE_INTEL_JITEVENTS " ")<br>
> if (LLVM_USE_INTEL_JITEVENTS)<br>
> set(LLVMOPTIONALCOMPONENTS IntelJITEvents)<br>
> endif (LLVM_USE_INTEL_JITEVENTS)<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>