Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions em-dwp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
# Copyright 2020 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
#
# Entry point for running python scripts on UNIX systems.
#
# Automatically generated by `create_entry_points.py`; DO NOT EDIT.
#
# To make modifications to this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
echo 'unable to find python in $PATH'
exit 1
fi

exec "$PYTHON" "$0.py" "$@"
14 changes: 14 additions & 0 deletions em-dwp.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: Entry point for running python scripts on windows systems.
::
:: Automatically generated by `create_entry_points.py`; DO NOT EDIT.
::
:: To make modifications to this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

@setlocal
@set EM_PY=%EMSDK_PYTHON%
@if "%EM_PY%"=="" (
set EM_PY=python
)

@"%EM_PY%" "%~dp0\%~n0.py" %*
18 changes: 3 additions & 15 deletions emar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,11 @@
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.

"""Archive helper script

This script acts as a frontend replacement for `llvm-ar`.
"""Wrapper scripte around `llvm-ar`.
"""

import sys

from tools import shared


#
# Main run() function
#
def run():
cmd = [shared.LLVM_AR] + sys.argv[1:]
return shared.run_process(cmd, stdin=sys.stdin, check=False).returncode


if __name__ == '__main__':
sys.exit(run())
cmd = [shared.LLVM_AR] + sys.argv[1:]
sys.exit(shared.run_process(cmd, stdin=sys.stdin, check=False).returncode)
31 changes: 31 additions & 0 deletions emdwp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
# Copyright 2020 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
#
# Entry point for running python scripts on UNIX systems.
#
# Automatically generated by `create_entry_points.py`; DO NOT EDIT.
#
# To make modifications to this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
echo 'unable to find python in $PATH'
exit 1
fi

exec "$PYTHON" "$(dirname $0)/tools/emdwp.py" "$@"
14 changes: 14 additions & 0 deletions emdwp.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: Entry point for running python scripts on windows systems.
::
:: Automatically generated by `create_entry_points.py`; DO NOT EDIT.
::
:: To make modifications to this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

@setlocal
@set EM_PY=%EMSDK_PYTHON%
@if "%EM_PY%"=="" (
set EM_PY=python
)

@"%EM_PY%" "%~dp0\tools\emdwp.py" %*
31 changes: 31 additions & 0 deletions emnm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
# Copyright 2020 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
#
# Entry point for running python scripts on UNIX systems.
#
# Automatically generated by `create_entry_points.py`; DO NOT EDIT.
#
# To make modifications to this file, edit `tools/run_python.sh` and then run
# `tools/create_entry_points.py`

if [ -z "$PYTHON" ]; then
PYTHON=$EMSDK_PYTHON
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python3 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
PYTHON=$(which python 2> /dev/null)
fi

if [ -z "$PYTHON" ]; then
echo 'unable to find python in $PATH'
exit 1
fi

exec "$PYTHON" "$(dirname $0)/tools/emnm.py" "$@"
14 changes: 14 additions & 0 deletions emnm.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:: Entry point for running python scripts on windows systems.
::
:: Automatically generated by `create_entry_points.py`; DO NOT EDIT.
::
:: To make modifications to this file, edit `tools/run_python.bat` and then run
:: `tools/create_entry_points.py`

@setlocal
@set EM_PY=%EMSDK_PYTHON%
@if "%EM_PY%"=="" (
set EM_PY=python
)

@"%EM_PY%" "%~dp0\tools\emnm.py" %*
2 changes: 1 addition & 1 deletion tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -6771,7 +6771,7 @@ def test_disable_inlining(self):

# To this test to be successful, foo() shouldn't have been inlined above and
# foo() should be in the function list
output = self.run_process([shared.LLVM_NM, 'test2.o'], stdout=PIPE).stdout
output = self.run_process([shared.EM_NM, 'test2.o'], stdout=PIPE).stdout
self.assertContained('foo', output)

def test_output_eol(self):
Expand Down
4 changes: 4 additions & 0 deletions tools/create_entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
emsize
emdump
emprofile
emdwp
emnm
tools/file_packager
tools/webidl_binder
tests/runner
Expand All @@ -46,6 +48,8 @@
entry_remap = {
'emdump': 'tools/emdump',
'emprofile': 'tools/emprofile',
'emdwp': 'tools/emdwp',
'emnm': 'tools/emnm',
}

tools_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
16 changes: 16 additions & 0 deletions tools/emdwp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# Copyright 2016 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.

"""Wrapper scripte around `llvm-dwp`.
"""

import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from tools import shared

cmd = [shared.LLVM_DWP] + sys.argv[1:]
sys.exit(shared.run_process(cmd, stdin=sys.stdin, check=False).returncode)
16 changes: 16 additions & 0 deletions tools/emnm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# Copyright 2016 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.

"""Wrapper scripte around `llvm-nm`.
"""

import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from tools import shared

cmd = [shared.LLVM_NM] + sys.argv[1:]
sys.exit(shared.run_process(cmd, stdin=sys.stdin, check=False).returncode)
2 changes: 2 additions & 0 deletions tools/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ def do_replace(input_, pattern, replacement):
CLANG_CXX = os.path.expanduser(build_clang_tool_path(exe_suffix('clang++')))
LLVM_LINK = build_llvm_tool_path(exe_suffix('llvm-link'))
LLVM_AR = build_llvm_tool_path(exe_suffix('llvm-ar'))
LLVM_DWP = build_llvm_tool_path(exe_suffix('llvm-dwp'))
LLVM_RANLIB = build_llvm_tool_path(exe_suffix('llvm-ranlib'))
LLVM_OPT = os.path.expanduser(build_llvm_tool_path(exe_suffix('opt')))
LLVM_NM = os.path.expanduser(build_llvm_tool_path(exe_suffix('llvm-nm')))
Expand All @@ -838,6 +839,7 @@ def do_replace(input_, pattern, replacement):
EMRANLIB = bat_suffix(path_from_root('emranlib'))
EMCMAKE = bat_suffix(path_from_root('emcmake'))
EMCONFIGURE = bat_suffix(path_from_root('emconfigure'))
EM_NM = bat_suffix(path_from_root('emnm'))
FILE_PACKAGER = bat_suffix(path_from_root('tools', 'file_packager'))

apply_configuration()
Expand Down