build: only do the lower case symbol copy on case sensitive file systems (#24876)

This commit is contained in:
Samuel Attard 2020-08-06 10:39:24 -07:00 committed by GitHub
parent 5ed8afbdb6
commit 4f4c383ec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,11 @@ import os
import shutil import shutil
import subprocess import subprocess
import sys import sys
import tempfile
def is_fs_case_sensitive():
with tempfile.NamedTemporaryFile(prefix='TmP') as tmp_file:
return(not os.path.exists(tmp_file.name.lower()))
sys.path.append( sys.path.append(
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../.."))
@ -50,6 +55,7 @@ def main():
# The symbol server needs lowercase paths, it will fail otherwise # The symbol server needs lowercase paths, it will fail otherwise
# So lowercase all the file paths here # So lowercase all the file paths here
if is_fs_case_sensitive():
for f in files: for f in files:
lower_f = f.lower() lower_f = f.lower()
if lower_f != f: if lower_f != f: