Skip to content

Commit

Permalink
Add configuration support to detect and use LLVM libraries.
Browse files Browse the repository at this point in the history
This adds the --with-llvm configuration flag.  It's used to find
the path to LLVM's llvm-config which produces the pre-processor and
linker flags needed to include LLVM's ProfileData library.

This change only includes the necessary configury bits to support
building with LLVM libraries.  It does not change the LLVM profile
converter at all.
  • Loading branch information
dnovillo committed Mar 2, 2016
1 parent 812c84f commit 0029f4b
Show file tree
Hide file tree
Showing 7 changed files with 3,518 additions and 1,965 deletions.
18 changes: 12 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ COMMON_PROFILE_CREATOR_FILES = addr2line.cc gcov.cc instruction_map.cc \

bin_PROGRAMS = create_gcov
create_gcov_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) create_gcov.cc
create_gcov_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a
create_gcov_LDADD = $(LLVM_LDFLAGS) libquipper.a libglog.a libsymbolize.a libgflags.a
create_gcov_CXXFLAGS = $(LLVM_CXXFLAGS)

bin_PROGRAMS += dump_gcov
dump_gcov_SOURCES = profile_reader.cc symbol_map.cc module_grouper.cc gcov.cc \
Expand All @@ -22,26 +23,31 @@ dump_gcov_LDADD = libglog.a libgflags.a libsymbolize.a

bin_PROGRAMS += sample_merger
sample_merger_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) sample_merger.cc
sample_merger_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a
sample_merger_LDADD = $(LLVM_LDFLAGS) libquipper.a libglog.a libsymbolize.a libgflags.a
sample_merger_CXXFLAGS = $(LLVM_CXXFLAGS)

bin_PROGRAMS += profile_merger
profile_merger_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) profile_reader.cc \
profile_merger.cc
profile_merger_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a
profile_merger_CXXFLAGS = $(LLVM_CXXFLAGS)
profile_merger_LDADD = $(LLVM_LDFLAGS) libquipper.a libglog.a libsymbolize.a libgflags.a

bin_PROGRAMS += profile_diff
profile_diff_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) profile_reader.cc \
profile_diff.cc
profile_diff_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a
profile_diff_LDADD = $(LLVM_LDFLAGS) libquipper.a libglog.a libsymbolize.a libgflags.a
profile_diff_CXXFLAGS = $(LLVM_CXXFLAGS)

bin_PROGRAMS += profile_update
profile_update_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) profile_reader.cc \
profile_update.cc
profile_update_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a
profile_update_LDADD = $(LLVM_LDFLAGS) libquipper.a libglog.a libsymbolize.a libgflags.a
profile_update_CXXFLAGS = $(LLVM_CXXFLAGS)

bin_PROGRAMS += create_llvm_prof
create_llvm_prof_SOURCES = $(COMMON_PROFILE_CREATOR_FILES) create_llvm_prof.cc
create_llvm_prof_LDADD = libquipper.a libglog.a libsymbolize.a libgflags.a
create_llvm_prof_LDADD = $(LLVM_LDFLAGS) libquipper.a libglog.a libsymbolize.a libgflags.a
create_llvm_prof_CXXFLAGS = $(LLVM_CXXFLAGS)

noinst_LIBRARIES = libquipper.a
libquipper_a_SOURCES = chromiumos-wide-profiling/address_mapper.cc chromiumos-wide-profiling/perf_reader.cc \
Expand Down
1,344 changes: 1,276 additions & 68 deletions Makefile.in

Large diffs are not rendered by default.

Loading

0 comments on commit 0029f4b

Please sign in to comment.