harvard-acc / LLVM-Tracer

An LLVM pass to profile dynamic LLVM IR instructions and runtime values
Other
135 stars 35 forks source link

Enhancement: CMake scripts for Aladdin support #6

Closed rgly closed 9 years ago

rgly commented 9 years ago

The CMake scripts of LLVM now can be used by CMake scripts of Aladdin. In that condition, C examples of LLVM-Tracer would be ignored. I also add some CMake options for users who has installed their toolchains outside from system directories. If you're using Clang++, GCC_INSTALL_PREFIX is helpful if you prefer you own GCC installation than the default GCC settings of Clang.

ysshao commented 9 years ago

Looks very nice! Can you explain to me a bit more about what does co-cmake with Aladdin do here? How users would invoke Aladdin runs from here?

rgly commented 9 years ago

In short, these patches are developed on purpose of "Let Aladdin reuse CMake scripts of LLVM-Tracer" Actually, it is just the arrangement of CMake scripts. Aladdin can reuse the scripts and build LLVM-Tracer under Aladdin's build directory and configure tests, therefore reduce beginners' effort.

How CMake scripts of Aladdin work

  1. According to $TRACER_HOME, search and include CMake scripts of LLVM-Tracer
  2. In CMake scripts of LLVM-Tracer, if Cmake variable HAS_ALADDIN is TRUE, the C examples of LLVM-Tracer will be ignored.
  3. Build libraries of LLVM-Tracer under /build-directory/LLVM-Tracer.
  4. Build binary of Aladdin under /build-directory/common
  5. Generate shell sciprt for test, and create CTests with C examples of Aladdin
ysshao commented 9 years ago

standalone test in LLVM-Tracer doesn't seem to work anymore:

[shao@***]LLVM-Tracer $ ctest -V UpdateCTestConfiguration from :/shao/Projects/GitHub/LLVM-Tracer/DartConfiguration.tcl UpdateCTestConfiguration from :/shao/Projects/GitHub/LLVM-Tracer/DartConfiguration.tcl Test project /shao/Projects/GitHub/LLVM-Tracer Constructing a list of tests Checking test dependency graph... Checking test dependency graph end No tests were found!!!

rgly commented 9 years ago

I think the test failure is due to wrong trace_logger.llvm path. Now it is fixed. All typos you mentioned are fixed.

ysshao commented 9 years ago

Hi Chia-Wei,

I'll also close this pull request since we decided to hold off the CMake Aladdin patch.

Thanks, Sophia