summaryrefslogtreecommitdiff
path: root/xmake/core/platform/environment.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-11-21 20:23:52 +0800
committerruki <[email protected]>2020-11-21 20:23:52 +0800
commit287d1e2ca2bd376d488f91d58dd36f45d2a3cf6a (patch)
treea7917cb9ec1f393d39512bc2e33731093d08e3eb /xmake/core/platform/environment.lua
parentb10a4d83559dd0598c2a2263addb470160565f16 (diff)
add DYLD_LIBRARY_PATH
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