mirror of https://github.com/vitalif/openscad
#669 Support libc++ in macosx-sanity-check
parent
137928fced
commit
b567f844ad
|
@ -20,6 +20,8 @@ import re
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
|
|
||||||
|
cxxlib = None
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print >> sys.stderr, "Usage: " + sys.argv[0] + " <executable>"
|
print >> sys.stderr, "Usage: " + sys.argv[0] + " <executable>"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -62,12 +64,17 @@ def find_dependencies(file):
|
||||||
return None
|
return None
|
||||||
deps = output.split('\n')
|
deps = output.split('\n')
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
#print dep
|
# print dep
|
||||||
# Fail if anything is linked with libc++, as that's not backwards compatible
|
# Fail if libstc++ and libc++ was mixed
|
||||||
# with Mac OS X 10.6
|
global cxxlib
|
||||||
if re.search("libc\+\+", dep):
|
match = re.search("lib(std)?c\+\+", dep)
|
||||||
print "Error: clang's libc++ is used by " + file
|
if match:
|
||||||
return None
|
if not cxxlib:
|
||||||
|
cxxlib = match.group(0)
|
||||||
|
else:
|
||||||
|
if cxxlib != match.group(0):
|
||||||
|
print "Error: Mixing libc++ and libstdc++"
|
||||||
|
return None
|
||||||
dep = re.sub(".*:$", "", dep) # Take away header line
|
dep = re.sub(".*:$", "", dep) # Take away header line
|
||||||
dep = re.sub("^\t", "", dep) # Remove initial tabs
|
dep = re.sub("^\t", "", dep) # Remove initial tabs
|
||||||
dep = re.sub(" \(.*\)$", "", dep) # Remove trailing parentheses
|
dep = re.sub(" \(.*\)$", "", dep) # Remove trailing parentheses
|
||||||
|
|
Loading…
Reference in New Issue