From f892b41d2d5bad691807f08c473f14cbd4f0a8b7 Mon Sep 17 00:00:00 2001 From: Hong Chen Date: Tue, 23 Jul 2024 11:53:33 -0500 Subject: [PATCH] Added TRICK_LDFLAGS to the rule for linking shared library for jit input. (#1745) * Added TRICK_LDFLAGS to the rule for linking shared library so user can use TRICK_LDFLAGS for linking shared library if necessary. * Removed the new line added by accident. --- trick_source/sim_services/JITInputFile/JITInputFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trick_source/sim_services/JITInputFile/JITInputFile.cpp b/trick_source/sim_services/JITInputFile/JITInputFile.cpp index 71e82f82..0e255be6 100644 --- a/trick_source/sim_services/JITInputFile/JITInputFile.cpp +++ b/trick_source/sim_services/JITInputFile/JITInputFile.cpp @@ -135,9 +135,9 @@ int Trick::JITInputFile::compile(std::string file_name) { // rule to link shared library outfile << library_fullpath_name << ": " << object_fullpath_name << std::endl ; #ifdef __APPLE__ - outfile << "\t" << get_trick_env((char *)"TRICK_CXX") << " -shared -undefined dynamic_lookup -o $@ $< " << std::endl << std::endl ; + outfile << "\t" << get_trick_env((char *)"TRICK_CXX") << " " << get_trick_env((char *)"TRICK_LDFLAGS") << " -shared -undefined dynamic_lookup -o $@ $< " << std::endl << std::endl ; #else - outfile << "\t" << get_trick_env((char *)"TRICK_CXX") << " -shared -o $@ $< " << std::endl << std::endl ; + outfile << "\t" << get_trick_env((char *)"TRICK_CXX") << " " << get_trick_env((char *)"TRICK_LDFLAGS") << " -shared -o $@ $< " << std::endl << std::endl ; #endif // rule to compile cpp file outfile << object_fullpath_name << ": " << file_name << std::endl ;