citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit de52aa8d6ece87bab3ba97bce9eb8f74ccbd9cfe
parent 683ec2c97c1c74fda6402ebc2aaa51367960caa1
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Sat,  9 Apr 2016 09:50:16 -0600

src: use PREFIX during compilation so we knoe where lib/ is

Diffstat:
Msrc/Jamfile | 1+
Msrc/instrument_main.cc | 4+---
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Jamfile b/src/Jamfile @@ -25,6 +25,7 @@ ObjectC++Flags $(INSTRUMENT_SRCS) $(CITRUN_SRCS) : -std=c++11 ; ObjectC++Flags $(INSTRUMENT_SRCS) : `llvm-config --cxxflags` ; ObjectC++Flags $(CITRUN_SRCS) : `pkg-config $(PKG_CONFIG_LIBS) --cflags` ; ObjectC++Flags $(CITRUN_SRCS) : -I/usr/local/include ; +ObjectDefines $(INSTRUMENT_SRCS) : PREFIX='\"$(PREFIX)\"' ; # Common link libraries on all platforms LINKFLAGS on citrun_instrument = `llvm-config --ldflags` ; diff --git a/src/instrument_main.cc b/src/instrument_main.cc @@ -173,8 +173,6 @@ main(int argc, char *argv[]) } bool linking = false; - // -o with -c means output object file - // -o without -c means output binary if (!object_arg && !compile_arg && source_files.size() > 0) // Assume single line a.out compilation // $ gcc main.c @@ -208,7 +206,7 @@ main(int argc, char *argv[]) // Add the runtime library and the symbol define hack // automatically to the command line modified_args.push_back(strdup(defsym_arg.str().c_str())); - modified_args.push_back(const_cast<char *>("/home/kyle/citrun/lib/libcitrun.so.0.0")); + modified_args.push_back(const_cast<char *>(PREFIX "/lib/libcitrun.so.0.0")); } // Instrumentation succeeded. Run the native compiler with a modified