citrun

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

commit 7e38abc1286c7ad28b9f60713515ed5e76b6933e
parent 76e1b45187367ca556d98bd28f8c2fa01c93a310
Author: Kyle Milz <kyle@windows.krwm.net>
Date:   Sun,  1 Jan 2017 21:31:00 -0800

src: add win32 compat bits for linking

Diffstat:
Msrc/inst_frontend.cc | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/inst_frontend.cc b/src/inst_frontend.cc @@ -205,6 +205,16 @@ InstFrontend::save_if_srcfile(char *arg) void InstFrontend::if_link_add_runtime(bool object_arg, bool compile_arg) { +#ifdef _WIN32 + bool linking = (std::strcmp(m_args[0], "link") == 0); + + if (!linking) + return; + + m_log << "Link detected, adding '" << CITRUN_SHARE "\\libcitrun.lib" + << "' to command line." << std::endl; + m_args.push_back(const_cast<char *>(CITRUN_SHARE "\\libcitrun.lib")); +#else // _WIN32 bool linking = false; if (!object_arg && !compile_arg && m_source_files.size() > 0) @@ -222,6 +232,7 @@ InstFrontend::if_link_add_runtime(bool object_arg, bool compile_arg) m_log << "Link detected, adding '"<< CITRUN_SHARE "/libcitrun.a" << "' to command line." << std::endl; m_args.push_back(const_cast<char *>(CITRUN_SHARE "/libcitrun.a")); +#endif // _WIN32 } //