Version 15 (modified by hfinkel, 5 years ago)

--

Welcome to using LLVM/clang on the BG/Q

ANL Early Access

If you have access to ANL's early access development systems, please also see (for usage details):  LLVM on the BG/Q Early-Access Wiki

For the benefit of those without access, here is a copy of our bgclang Download wrapper script (as of 2012-06-02). For use on other systems, you'll need to change some of the paths, but this will let you see what optimization settings are used by default. You should symlink this to bgclang++ to create a C++ wrapper.

Repository Information

I have yet to figure out how to best mirror my local repositories. Here's why:

  • LLVM uses subversion, and I've been using git-svn to manage local BG/Q changes.
  • git-svn uses rebasing to apply local changes on top of upstream changes; this amounts to history rewriting (dangerous but effective). I cannot simply push from the git-svn-managed repository to the public one because doing so would confuse copies cloned from the public version.
  • LLVM uses separate repositories for LLVM and clang, it is not clear how to best combine them into one public repository.

Thus, for the time being, we'll just need to use patches. Maybe I should push into separate (new) branches every time I commit? I'm certainly open to suggestions.

Patches

r157929-20120603

r155766-20120426

Note: the date tag on the clang patch regressed compared to the previous version because upstream commits rendered later local changes irrelevant.

r154948-20120422

Building

Follow the normal directions for checking out llvm and clang from the llvm.org repositories. Run configure. I recommend building from a directory different from the source directory. I use the following make command:

 make -j 8 ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O2 EXTRA_OPTIONS=-mminimal-toc prefix=/home/projects/llvm install
 cp -Rf ${LLVM_SRC_DIR}/tools/clang/tools/scan-{build,view} /home/projects/llvm/

Where the command is run from the top-level build directory and LLVM_SRC_DIR is set to the path to the top-level source directory.

Attachments