Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # This file is building the plugin for clang in chromium checkout.
  2. # This file requires the clang build system, at least for now. So to use this
  3. # Makefile, you should execute the following commands to copy this directory
  4. # into a clang checkout:
  5. #
  6. # cp -R <this directory> chromium/src/third_party/llvm/tools/clang/tools/report-memory-usage-plugin
  7. # cd chromium/src/third_party/llvm/tools/clang/tools/report-memory-usage-plugin
  8. # make
  9. #
  10. # It can be run with clang build with help of these clang flags:
  11. #
  12. # -Xclang -load \
  13. # -Xclang <plugin-libs-dir>/libReportMemoryUsage.so \
  14. # -Xclang -plugin \
  15. # -Xclang report-memory-usage
  16. CLANG_LEVEL := ../..
  17. LIBRARYNAME = ReportMemoryUsage
  18. LINK_LIBS_IN_SHARED = 0
  19. SHARED_LIBRARY = 1
  20. include $(CLANG_LEVEL)/Makefile
  21. ifeq ($(OS),Darwin)
  22. LDFLAGS=-Wl,-undefined,dynamic_lookup
  23. endif
  24. BD=../../../../Release+Asserts
  25. SRC_DIR=../../../../../llvm/tools/clang/tools/report-memory-usage-plugin
  26. test: all
  27. @${BD}/bin/clang++ \
  28. -D_GNU_SOURCE \
  29. -D_DEBUG \
  30. -D__STDC_CONSTANT_MACROS \
  31. -D__STDC_FORMAT_MACROS \
  32. -D__STDC_LIMIT_MACROS \
  33. -D_GNU_SOURCE \
  34. -I${BD}/tools/clang/include \
  35. -Itools/clang/include \
  36. -I${BD}/include \
  37. -Iinclude \
  38. ${SRC_DIR}/tests/Source/WebCore/Test.cpp \
  39. -fsyntax-only \
  40. -Xclang -load \
  41. -Xclang ${BD}/lib/lib${LIBRARYNAME}.so \
  42. -Xclang -plugin \
  43. -Xclang report-memory-usage