mirror of
https://github.com/denoland/deno.git
synced 2025-01-18 03:44:05 -05:00
Pass env vars through in build_extra/rust/run.py
This fixes an appveyor issue that arrises when implementing snapshot_creator in Rust.
This commit is contained in:
parent
958a80e6db
commit
79c3439f26
1 changed files with 5 additions and 4 deletions
|
@ -7,6 +7,8 @@ import sys
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
env = os.environ.copy()
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
# On Windows, when gn is setting up the build toolchain, it produces a set
|
# On Windows, when gn is setting up the build toolchain, it produces a set
|
||||||
# of environment variables that are required to invoke the right build
|
# of environment variables that are required to invoke the right build
|
||||||
|
@ -15,10 +17,9 @@ if sys.platform == 'win32':
|
||||||
# The file is in 'windows environment block' format, which contains
|
# The file is in 'windows environment block' format, which contains
|
||||||
# multiple 'key=value' pairs, separated by '\0' bytes, and terminated by
|
# multiple 'key=value' pairs, separated by '\0' bytes, and terminated by
|
||||||
# two '\0' bytes at the end.
|
# two '\0' bytes at the end.
|
||||||
env_pairs = open("environment.x64").read()[:-2].split('\0')
|
gn_env_pairs = open("environment.x64").read()[:-2].split('\0')
|
||||||
env = dict([pair.split('=', 1) for pair in env_pairs])
|
gn_env = dict([pair.split('=', 1) for pair in gn_env_pairs])
|
||||||
else:
|
env.update(gn_env)
|
||||||
env = os.environ.copy()
|
|
||||||
|
|
||||||
# This is for src/msg.rs to know where to find msg_generated.rs.
|
# This is for src/msg.rs to know where to find msg_generated.rs.
|
||||||
# When building with Cargo this variable is set by build.rs.
|
# When building with Cargo this variable is set by build.rs.
|
||||||
|
|
Loading…
Add table
Reference in a new issue