Fix LC_ID_DYLIB for OS X

Wrapping the SHLINKFLAGS in an array rather than as a single string
caused the link flags to be passed to clang double quoted. This cuased
clang to interpret the flags as a string rather than as a flag which
caused the -install_name flag to never be passed to the linker.
This commit is contained in:
Joe Rozner 2013-12-03 13:28:56 -08:00
parent 544f021849
commit 52bdc9d3dc

View file

@ -40,7 +40,7 @@ env.ScanReplace('libhammer.pc.in')
env.MergeFlags("-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attributes")
if env['PLATFORM'] == 'darwin':
env.Append(SHLINKFLAGS = ['-install_name', '$TARGET'])
env.Append(SHLINKFLAGS = '-install_name ' + env["libpath"] + '/${TARGET.file}')
else:
env.MergeFlags("-lrt")