aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjulien.hamaide <julien.hamaide@fishingcactus.com>2012-01-03 14:47:27 +0100
committerjulien.hamaide <julien.hamaide@fishingcactus.com>2012-01-03 22:54:04 +0100
commit3224bff920ca86471a532a5806d3d549cd0bb4d2 (patch)
treeb2fe430abef03023aa067f5f9ecedc46799c4648
parente02fa83807fef1a78292daf12c94255ac7127134 (diff)
Fix bitcode support when llvm is compiled for darwin target
-rw-r--r--tools/shared.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 12490cdf..2c83bdeb 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -664,5 +664,11 @@ class Building:
return False
# look for magic signature
b = open(filename, 'r').read(4)
- return b[0] == 'B' and b[1] == 'C'
+ if b[0] == 'B' and b[1] == 'C':
+ return True
+ elif ord(b[0]) == 222 and ord(b[1]) == 192 and ord(b[2]) == 23 and ord(b[3]) == 11:
+ b = open(filename, 'r').read(24)
+ return b[20] == 'B' and b[21] == 'C'
+
+ return False