aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-15 16:39:56 -0500
committerAlon Zakai <alonzakai@gmail.com>2012-02-15 17:00:25 -0500
commitd8e25261b69dd4cd5acaacf6c76d7c658c25e9bd (patch)
tree47277d9c408afebdb96a604816e82d08beb7163b /emcc
parentb16a890dc7e1435497a1b97b1a0fb7b0987faaef (diff)
support compiling .so files directly in emcc
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc8
1 files changed, 5 insertions, 3 deletions
diff --git a/emcc b/emcc
index c57bec4f..1ec8bdad 100755
--- a/emcc
+++ b/emcc
@@ -460,6 +460,8 @@ try:
shared.Building.llvm_as(input_file, temp_file)
temp_files.append(temp_file)
+ if not LEAVE_INPUTS_RAW: assert len(temp_files) == len(input_files)
+
# If we were just asked to generate bitcode, stop there
if final_suffix not in ['js', 'html']:
if llvm_opts > 0:
@@ -534,8 +536,8 @@ try:
('dlmalloc', create_dlmalloc, fix_dlmalloc, dlmalloc_symbols)]:
need = []
has = []
- for input_file in input_files:
- symbols = shared.Building.llvm_nm(in_temp(unsuffixed_basename(input_file) + '.o'))
+ for temp_file in temp_files:
+ symbols = shared.Building.llvm_nm(temp_file)
for library_symbol in library_symbols:
if library_symbol in symbols.undefs:
need.append(library_symbol)
@@ -559,7 +561,7 @@ try:
final = in_temp(target_basename + '.bc')
else:
if not LEAVE_INPUTS_RAW:
- shutil.move(in_temp(unsuffixed_basename(input_files[0]) + '.o'), in_temp(target_basename + '.bc'))
+ shutil.move(temp_files[0], in_temp(target_basename + '.bc'))
final = in_temp(target_basename + '.bc')
else:
final = input_files[0]