summaryrefslogtreecommitdiff
path: root/xmake/core/platform/environment.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/platform/environment.lua')
-rw-r--r--xmake/core/platform/environment.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/platform/environment.lua b/xmake/core/platform/environment.lua
index d82b4b297..91491ca0a 100644
--- a/xmake/core/platform/environment.lua
+++ b/xmake/core/platform/environment.lua
@@ -60,10 +60,13 @@ end
-- enter the running environment
function environment._enter_run()
- local oldenvs = {}
- oldenvs.PATH = os.getenv("PATH")
- oldenvs.LD_LIBRARY_PATH = os.getenv("LD_LIBRARY_PATH")
- environment._OLDENVS_RUN = oldenvs
+ local oldenvs = {}
+ oldenvs.PATH = os.getenv("PATH")
+ oldenvs.LD_LIBRARY_PATH = os.getenv("LD_LIBRARY_PATH")
+ if os.host() == "macosx" then
+ oldenvs.DYLD_LIBRARY_PATH = os.getenv("DYLD_LIBRARY_PATH")
+ end
+ environment._OLDENVS_RUN = oldenvs
return true
end