Skip to content
Merged
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
20 changes: 0 additions & 20 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,6 @@ def create_lib(libname, inputs):
raise Exception('unknown suffix ' + libname)


def read_symbols(path):
with open(path) as f:
content = f.read()

# Require that Windows newlines should not be present in a symbols file, if running on Linux or macOS
# This kind of mismatch can occur if one copies a zip file of Emscripten cloned on Windows over to
# a Linux or macOS system. It will result in Emscripten linker getting confused on stray \r characters,
# and be unable to link any library symbols properly. We could harden against this by .strip()ping the
# opened files, but it is possible that the mismatching line endings can cause random problems elsewhere
# in the toolchain, hence abort execution if so.
if os.name != 'nt' and '\r\n' in content:
raise Exception('Windows newlines \\r\\n detected in symbols file "' + path + '"! This could happen for example when copying Emscripten checkout from Windows to Linux or macOS. Please use Unix line endings on checkouts of Emscripten on Linux and macOS!')

return building.parse_symbols(content).defs


def get_wasm_libc_rt_files():
# Static linking is tricky with LLVM, since e.g. memset might not be used
# from libc, but be used as an intrinsic, and codegen will generate a libc
Expand Down Expand Up @@ -240,10 +224,6 @@ def get_default_variation(cls, **kwargs):
# and left as None in an abstract library class, e.g. MTLibrary.
name = None

# A set of symbols that this library exports. This will be set with a set
# returned by `read_symbols`.
symbols = set()

# Set to true to prevent EMCC_FORCE_STDLIBS from linking this library.
never_force = False

Expand Down