Jie Zhou via llvm-dev
2019-Oct-20 23:20 UTC
[llvm-dev] How to configure cmake to not rebuild .inc (tablegen) files?
Dear all, I’m developing Clang&LLVM on MacOS Catalina 10.15. Now every time I "make clang", the building systems rebuilds all the .inc files generated by cmake, which essentially rebuilds all the tablegen files in llvm, although I did not change any of the tablegen files. The building is unnecessary and slow, especially when it builds the X86GenSubtargetInfo.inc. Is there a way to prevent cmake generating Makefiles that rebuilds all the tablegen files? Here is my command line to run cmake for generating Makefiles: cmake -G “Unix Makefiles” -DLLVM_TARGETS_TO_BUILD=“X86" -DCMAKE_BUILD_TYPE=Debug $(LLVM_SRC) The cmake version is 3.13.4. And I did not experience the same behavior on a Linux. Thanks, - Jie -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191020/870466c8/attachment.html>
Joan Lluch via llvm-dev
2019-Oct-21 07:11 UTC
[llvm-dev] How to configure cmake to not rebuild .inc (tablegen) files?
Hi Jie, I’m using a Mac with Xcode and found that specifying DLLVM_OPTIMIZED_TABLEGEN=On helped. Incremental builds are faster but tablegen files are run every time anyway, so it’s not actually a fix. I posted this issue before but it seems solving this is not that easy, at least for Xcode. In the case of Xcode I found big speed improvements after saving the project xcuserdata folder in a safe place, deleting the entire “build” folder, re-creating a fresh “build” with cmake, and moving the xcuserdata folder I saved before in place. Unfortunately, this stops working as soon as I checkout branches, or pull commits from origin, so I need to repeat the same procedure to get fast compiles again. John,> On 21 Oct 2019, at 01:20, Jie Zhou via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Dear all, > > I’m developing Clang&LLVM on MacOS Catalina 10.15. > Now every time I "make clang", the building systems rebuilds > all the .inc files generated by cmake, which essentially > rebuilds all the tablegen files in llvm, although I did not > change any of the tablegen files. The building is unnecessary > and slow, especially when it builds the X86GenSubtargetInfo.inc. > Is there a way to prevent cmake generating Makefiles that > rebuilds all the tablegen files? > > Here is my command line to run cmake for generating Makefiles: > > cmake -G “Unix Makefiles” -DLLVM_TARGETS_TO_BUILD=“X86" -DCMAKE_BUILD_TYPE=Debug $(LLVM_SRC) > > The cmake version is 3.13.4. And I did not experience the same behavior on a Linux. > > Thanks, > - Jie > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191021/9394814b/attachment.html>
Mehdi AMINI via llvm-dev
2019-Oct-21 18:16 UTC
[llvm-dev] How to configure cmake to not rebuild .inc (tablegen) files?
On Sun, Oct 20, 2019 at 4:21 PM Jie Zhou via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Dear all, > > I’m developing Clang&LLVM on MacOS Catalina 10.15. > Now every time I "make clang", the building systems rebuilds > all the .inc files generated by cmake, >Are you saying that if you re-run `make clang` immediately after the first invocation complete you see these files rebuilt? You're not changing anything in the repo or running `git pull` (or equivalent)? This would really not be expected. -- Mehdi> which essentially > rebuilds all the tablegen files in llvm, although I did not > change any of the tablegen files. The building is unnecessary > and slow, especially when it builds the X86GenSubtargetInfo.inc. > Is there a way to prevent cmake generating Makefiles that > rebuilds all the tablegen files? > > Here is my command line to run cmake for generating Makefiles: > > cmake -G “Unix Makefiles” -DLLVM_TARGETS_TO_BUILD=“X86" > -DCMAKE_BUILD_TYPE=Debug $(LLVM_SRC) > > The cmake version is 3.13.4. And I did not experience the same behavior on > a Linux. > > Thanks, > - Jie > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191021/6a169a08/attachment.html>
Jie Zhou via llvm-dev
2019-Oct-21 20:00 UTC
[llvm-dev] How to configure cmake to not rebuild .inc (tablegen) files?
On Oct 21, 2019, at 14:16, Mehdi AMINI <joker.eph at gmail.com<mailto:joker.eph at gmail.com>> wrote: On Sun, Oct 20, 2019 at 4:21 PM Jie Zhou via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Dear all, I’m developing Clang&LLVM on MacOS Catalina 10.15. Now every time I "make clang", the building systems rebuilds all the .inc files generated by cmake, Are you saying that if you re-run `make clang` immediately after the first invocation complete you see these files rebuilt? You're not changing anything in the repo or running `git pull` (or equivalent)? This would really not be expected. Yes the tablegen files get recompiled immediately after I run a `make clang`. I checked on a Ubuntu and did not see the same behavior. But luckily Joan's suggestion works: the -DLLVM_OPTIMIZED_TABLEGEN for cmake will do the trick. - Jie -- Mehdi which essentially rebuilds all the tablegen files in llvm, although I did not change any of the tablegen files. The building is unnecessary and slow, especially when it builds the X86GenSubtargetInfo.inc. Is there a way to prevent cmake generating Makefiles that rebuilds all the tablegen files? Here is my command line to run cmake for generating Makefiles: cmake -G “Unix Makefiles” -DLLVM_TARGETS_TO_BUILD=“X86" -DCMAKE_BUILD_TYPE=Debug $(LLVM_SRC) The cmake version is 3.13.4. And I did not experience the same behavior on a Linux. Thanks, - Jie _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=KAtyTEI8n3FritxDpKpR7rv3VjdmUs0luiVKZLb_bNI&m=a6d-_XqSI-3_vhs7WPW2QDFf8_o0tG-HnAow9qGcbys&s=Y5yX8hc8QmLTgMtpKpLop-queU5nUZ7pJXeHoGDxJ7I&e=> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191021/62202c31/attachment.html>