<div dir="ltr">I've re-opened <a href="https://reviews.llvm.org/D38406">https://reviews.llvm.org/D38406</a> and submitted a new patch.<div><br></div><div>Please let me know if this works better for you.</div><div><br></div><div>thanks...</div><div>don</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 4, 2017 at 5:58 PM, Don Hinton <span dir="ltr"><<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Okay, I'll re-open the diff and post a new patch with only the cmake changes.  Then we can iterate over any changes.<div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Dec 4, 2017 at 5:37 PM, Justin Bogner <span dir="ltr"><<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Don Hinton <<a href="mailto:hintonda@gmail.com" target="_blank">hintonda@gmail.com</a>> writes:<br>
> Hi Justin:<br>
><br>
> The problem was with generators like XCode and MSVC that create multiple<br>
> configurations, e.g., Release, Debug, etc., and need to rely on passing<br>
> -DNDEBUG in order to work.  That makes it tough to use a variable like<br>
> LLVM_ENABLE_DUMP that gets set at configure time..<br>
<br>
</span>One other option may be to pass the -DLLVM_ENABLE_DUMP flag to the build<br>
as well as adding it to llvm-config.h. Would that work?<br></blockquote><div><br></div></span><div>Sure, I can do that.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span><br>
> We could probably do a partial change that doesn't remove the NDEBUG tests,<br>
> but it still wouldn't work well with XCode and MSVC generators -- would<br>
> still compile and link, but just not as useful on a per configuration<br>
> basis.<br>
><br>
> Please let me know if that would be helpful, and I'll create a new diff for<br>
> you to review.<br>
<br>
</span>At the very least we need to make the change to move the<br>
LLVM_ENABLE_DUMP definition into Config/llvm-config.h. Headers aren't allowed<br>
to include Config/config.h (since it isn't installed), which means that<br>
currently we have some uses that aren't actually correct.<br>
<br>
An example of this is MC/MCSchedule.h, where we check LLVM_ENABLE_DUMP,<br>
but we don't include anything that defines it.<br></blockquote><div><br></div></span><div>To support this case, we'd have to pass it on the comandline, not in llvm-config.h.  </div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I think we should break this into two pieces: 1. Move LLVM_ENABLE_DUMP<br>
to llvm-config.h, and 2. Try to make this work with multi-config<br>
generators.<br></blockquote><div><br></div></span><div>Now that you mention it, I think we could add -DLLVM_ENABLE_DUMP to the various </div><div>CMAKE_CXX_FLAGS_${CMAKE_BUILD_<wbr>TYPE} variables that are configuration </div><div>specific instead of putting it in config.h or llvm-config.h.</div><div><br></div><div>That would solve the MC/MCSchedule.h issue.</div><div><br></div><div>Still not sure about how to effectively use XCode and MSVC generators, but I guess the </div><div>user clicks on something to change things once they are generated.  So generating </div><div>defaults should be fine.</div><div><div class="h5"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="m_5524879541036626116HOEnZb"><div class="m_5524879541036626116h5"><br>
> thanks...<br>
> don<br>
><br>
><br>
><br>
> On Mon, Dec 4, 2017 at 4:55 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>> wrote:<br>
><br>
>> Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> writes:<br>
>> > On Mon, Dec 4, 2017 at 5:24 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>><br>
>> wrote:<br>
>> >> Aaron Ballman via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> writes:<br>
>> >>> Author: aaronballman<br>
>> >>> Date: Sun Oct 15 07:32:27 2017<br>
>> >>> New Revision: 315854<br>
>> >>><br>
>> >>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=315854&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=315854&view=rev</a><br>
>> >>> Log:<br>
>> >>> Reverting r315590; it did not include changes for llvm-tblgen, which<br>
>> >>> is causing link errors for several people.<br>
>> >><br>
>> >> What's happening with this? Is someone investigating these errors? I'd<br>
>> >> really like the part of this change that moves LLVM_ENABLE_DUMP into<br>
>> >> llvm-config.h to get in, as it's currently kind of awkward to use in the<br>
>> >> half finished state.<br>
>> >><br>
>> >>> Error LNK2019 unresolved external symbol "public: void __cdecl<br>
>> >>> `anonymous namespace'::MatchableInfo::dum<wbr>p(void)const "<br>
>> >>> (?dump@MatchableInfo@?A0xf4f1c<wbr>304@@QEBAXXZ) referenced in function<br>
>> >>> "public: void __cdecl `anonymous<br>
>> >>> namespace'::AsmMatcherEmitter:<wbr>:run(class llvm::raw_ostream &)"<br>
>> >>> (?run@AsmMatcherEmitter@?A0xf4<wbr>f1c304@@QEAAXAEAVraw_ostream@<wbr>llvm@@@Z)<br>
>> >>> llvm-tblgen D:\llvm\2017\utils\TableGen\As<wbr>mMatcherEmitter.obj 1<br>
>> ><br>
>> > I've not been investigating -- I was only trying to get the bot back<br>
>> > to green. Perhaps Don has worked on this, however.<br>
>><br>
>> Okay, I couldn't find any email trail of followup (not even to mention<br>
>> the commit was reverted!), so I wasn't sure if I'd just missed the<br>
>> conversation here.<br>
>><br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>