Skip to content

Commit 94718df

Browse files
committed
Merge branch 'remove-pnacl-toolchain-cruft' of https://github.com/waywardmonkeys/emscripten into incoming
2 parents 6be1259 + 7267211 commit 94718df

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

emcc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ try:
619619
newargs[i] = ''
620620
elif newargs[i] == '-v':
621621
shared.COMPILER_OPTS += ['-v']
622-
#shared.LINK_CMD += ['-v'] # Enable verbose output from llvm-link, since it can take a long time and this gives some indication of progress.
623622
shared.check_sanity(force=True)
624623
newargs[i] = ''
625624
elif newargs[i].startswith('--shell-file'):

tools/shared.py

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def check_sanity(force=False):
488488
logging.critical('Node.js (%s) does not seem to work, check the paths in %s' % (NODE_JS, EM_CONFIG))
489489
sys.exit(1)
490490

491-
for cmd in [CLANG, LINK_CMD[0], LLVM_AR, LLVM_OPT, LLVM_AS, LLVM_DIS, LLVM_NM, LLVM_INTERPRETER]:
491+
for cmd in [CLANG, LLVM_LINK, LLVM_AR, LLVM_OPT, LLVM_AS, LLVM_DIS, LLVM_NM, LLVM_INTERPRETER]:
492492
if not os.path.exists(cmd) and not os.path.exists(cmd + '.exe'): # .exe extension required for Windows
493493
logging.critical('Cannot find %s, check the paths in %s' % (cmd, EM_CONFIG))
494494
sys.exit(1)
@@ -529,21 +529,9 @@ def check_sanity(force=False):
529529
except NameError:
530530
CLANG_ADD_VERSION = os.getenv('CLANG_ADD_VERSION')
531531

532-
USING_PNACL_TOOLCHAIN = os.path.exists(os.path.join(LLVM_ROOT, 'pnacl-clang'))
533-
534-
def modify_prefix(tool):
535-
if USING_PNACL_TOOLCHAIN:
536-
if tool.startswith('llvm-'):
537-
tool = tool[5:]
538-
tool = 'pnacl-' + tool
539-
if WINDOWS:
540-
tool += '.bat'
541-
return tool
542-
543532
# Some distributions ship with multiple llvm versions so they add
544533
# the version to the binaries, cope with that
545534
def build_llvm_tool_path(tool):
546-
tool = modify_prefix(tool)
547535
if LLVM_ADD_VERSION:
548536
return os.path.join(LLVM_ROOT, tool + "-" + LLVM_ADD_VERSION)
549537
else:
@@ -552,7 +540,6 @@ def build_llvm_tool_path(tool):
552540
# Some distributions ship with multiple clang versions so they add
553541
# the version to the binaries, cope with that
554542
def build_clang_tool_path(tool):
555-
tool = modify_prefix(tool)
556543
if CLANG_ADD_VERSION:
557544
return os.path.join(LLVM_ROOT, tool + "-" + CLANG_ADD_VERSION)
558545
else:
@@ -588,11 +575,7 @@ def get_clang_native_args():
588575
CLANG_CC=os.path.expanduser(build_clang_tool_path('clang'))
589576
CLANG_CPP=os.path.expanduser(build_clang_tool_path('clang++'))
590577
CLANG=CLANG_CPP
591-
if USING_PNACL_TOOLCHAIN:
592-
# The PNaCl toolchain doesn't have llvm-link, but we can fake it
593-
LINK_CMD = [build_llvm_tool_path('llvm-ld'), '-nostdlib', '-r']
594-
else:
595-
LINK_CMD = [build_llvm_tool_path('llvm-link')]
578+
LLVM_LINK=build_llvm_tool_path('llvm-link')
596579
LLVM_AR=build_llvm_tool_path('llvm-ar')
597580
LLVM_OPT=os.path.expanduser(build_llvm_tool_path('opt'))
598581
LLVM_AS=os.path.expanduser(build_llvm_tool_path('llvm-as'))
@@ -1365,15 +1348,15 @@ def consider_archive(f):
13651348
logging.debug('emcc: llvm-linking: %s to %s', actual_files, target)
13661349

13671350
# check for too-long command line
1368-
link_cmd = LINK_CMD + actual_files + ['-o', target]
1351+
link_cmd = [LLVM_LINK] + actual_files + ['-o', target]
13691352
# 8k is a bit of an arbitrary limit, but a reasonable one
1370-
# for max command line size before we use a respose file
1353+
# for max command line size before we use a response file
13711354
response_file = None
13721355
if len(' '.join(link_cmd)) > 8192:
13731356
logging.debug('using response file for llvm-link')
13741357
[response_fd, response_file] = mkstemp(suffix='.response', dir=TEMP_DIR)
13751358

1376-
link_cmd = LINK_CMD + ["@" + response_file]
1359+
link_cmd = [LLVM_LINK] + ["@" + response_file]
13771360

13781361
response_fh = os.fdopen(response_fd, 'w')
13791362
for arg in actual_files:

0 commit comments

Comments
 (0)