mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
fix windows build issue
This commit is contained in:
parent
0fcbcf7fc5
commit
69efd086f5
1 changed files with 2 additions and 15 deletions
|
@ -37,11 +37,7 @@ def host_platform():
|
||||||
elif os_type == "android":
|
elif os_type == "android":
|
||||||
os_type = "linux-androideabi"
|
os_type = "linux-androideabi"
|
||||||
elif os_type == "windows":
|
elif os_type == "windows":
|
||||||
# If we are in a Visual Studio environment, use msvc
|
|
||||||
if os.getenv("PLATFORM") is not None:
|
|
||||||
os_type = "pc-windows-msvc"
|
os_type = "pc-windows-msvc"
|
||||||
else:
|
|
||||||
os_type = "unknown"
|
|
||||||
elif os_type == "freebsd":
|
elif os_type == "freebsd":
|
||||||
os_type = "unknown-freebsd"
|
os_type = "unknown-freebsd"
|
||||||
else:
|
else:
|
||||||
|
@ -52,16 +48,7 @@ def host_platform():
|
||||||
def host_triple():
|
def host_triple():
|
||||||
os_type = host_platform()
|
os_type = host_platform()
|
||||||
cpu_type = platform.machine().lower()
|
cpu_type = platform.machine().lower()
|
||||||
if os_type.endswith("-msvc"):
|
if cpu_type in ["i386", "i486", "i686", "i768", "x86"]:
|
||||||
# vcvars*.bat should set it properly
|
|
||||||
platform_env = os.environ.get("PLATFORM").upper()
|
|
||||||
if platform_env == "X86":
|
|
||||||
cpu_type = "i686"
|
|
||||||
elif platform_env == "X64":
|
|
||||||
cpu_type = "x86_64"
|
|
||||||
else:
|
|
||||||
cpu_type = "unknown"
|
|
||||||
elif cpu_type in ["i386", "i486", "i686", "i768", "x86"]:
|
|
||||||
cpu_type = "i686"
|
cpu_type = "i686"
|
||||||
elif cpu_type in ["x86_64", "x86-64", "x64", "amd64"]:
|
elif cpu_type in ["x86_64", "x86-64", "x64", "amd64"]:
|
||||||
cpu_type = "x86_64"
|
cpu_type = "x86_64"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue