scons: conditional use of new RPATH inclusion

On OSX, clang doesn’t support the -z option.
This patch resolve the compiler error produced on MacOS platform.

Change-Id: Idfe69c30fe40add97d16d0f2e25e598b30d26a9d
Reviewed-on: https://gem5-review.googlesource.com/c/16649
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Andrea Mondelli
2019-02-22 11:42:16 -05:00
parent 174ef8a73e
commit f59e550bc8

View File

@@ -1090,7 +1090,9 @@ def add_local_rpath(env, *targets):
] ]
env.Append(RPATH=[env.Literal(os.path.join(*components))]) env.Append(RPATH=[env.Literal(os.path.join(*components))])
main.Append(LINKFLAGS=Split('-z origin')) if sys.platform != "darwin":
main.Append(LINKFLAGS=Split('-z origin'))
main.AddMethod(add_local_rpath, 'AddLocalRPATH') main.AddMethod(add_local_rpath, 'AddLocalRPATH')
# builds in ext are shared across all configs in the build root. # builds in ext are shared across all configs in the build root.