diff options
author | Adrian Thurston <thurston@colm.net> | 2020-03-22 13:00:03 +0200 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2020-03-22 13:03:10 +0200 |
commit | d5b745ef0f7a5b42674918ac204973c582de2297 (patch) | |
tree | f5b58f6669e73a3c106d375eff3e050b75b9cd13 /src | |
parent | 197fdd7e939855e229ff6755b76fe8c52756cbf0 (diff) | |
download | colm-d5b745ef0f7a5b42674918ac204973c582de2297.tar.gz |
use a static link with libcolm.a when running out of the source tree
A dynamic link is proving complicated on OSX. When the package is configured to
install to a new install location, but make install hasn't happened yet the
link fails This may indicate we are not getting the code we think we are. We
can eschew all these risks with a static link and reserve dynamic linking for
when we are running from the installed location.
This patch also includes some testing fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cc b/src/main.cc index a3a7d2c9..5d6cbac4 100644 --- a/src/main.cc +++ b/src/main.cc @@ -485,7 +485,7 @@ void compileOutput( const char *argv0, const bool inSource, char *srcLocation ) " -I%s/../aapl" " -I%s/include" " -L%s" - " -Wl,-rpath,%s", + " %s/libcolm.a", binaryFn, intermedFn, srcLocation, srcLocation, location, location ); } @@ -510,7 +510,9 @@ void compileOutput( const char *argv0, const bool inSource, char *srcLocation ) strcat( command, " -L" ); strcat( command, *lp ); } - strcat( command, " -lcolm" ); + + if ( !inSource ) + strcat( command, " -lcolm" ); if( !compileOutputCommand( command ) && run ) runOutputProgram(); |