aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-03 10:03:39 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-03-03 10:14:16 -0800
commitd60e298132f99b052e2b4cebfcac950dd145cecb (patch)
tree6b48a84d09eb5f2a86ef538b20e5546de6125c31
parentd6625999e9eb59c951a137f43a258a64ef44773d (diff)
put emscripten version in emscripten-version.txt, like other repos
-rw-r--r--emscripten-version.txt2
-rw-r--r--tools/shared.py9
2 files changed, 9 insertions, 2 deletions
diff --git a/emscripten-version.txt b/emscripten-version.txt
new file mode 100644
index 00000000..86df5111
--- /dev/null
+++ b/emscripten-version.txt
@@ -0,0 +1,2 @@
+1.12.3
+
diff --git a/tools/shared.py b/tools/shared.py
index ac6319bf..31f0aad9 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -310,7 +310,8 @@ def check_fastcomp():
seen = False
d = os.path.dirname(LLVM_COMPILER)
while d != os.path.dirname(d):
- if os.path.exists(os.path.join(d, 'emscripten-version.txt')):
+ # look for version file in llvm repo, making sure not to mistake the emscripten repo for it
+ if os.path.exists(os.path.join(d, 'emscripten-version.txt')) and not os.path.abspath(d) == os.path.abspath(path_from_root()):
seen = True
llvm_version = open(os.path.join(d, 'emscripten-version.txt')).read().strip()
if os.path.exists(os.path.join(d, 'tools', 'clang', 'emscripten-version.txt')):
@@ -365,7 +366,11 @@ def find_temp_directory():
# we re-check sanity when the settings are changed)
# We also re-check sanity and clear the cache when the version changes
-EMSCRIPTEN_VERSION = '1.12.3'
+try:
+ EMSCRIPTEN_VERSION = open(path_from_root('emscripten-version.txt')).read().strip()
+except Exception, e:
+ logging.error('cannot find emscripten version ' + str(e))
+ EMSCRIPTEN_VERSION = 'unknown'
def generate_sanity():
return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT + '|' + get_clang_version()