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
8 changes: 7 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ See docs/process.md for how version tagging works.
Current Trunk
-------------
- Honor `CACHE` setting in config file as an alternative to `EM_CACHE`
environment variable or `--cache` commandline flag.
environment variable.
- Remove `--cache` command line arg. The `CACHE` config setting and the
`EM_CACHE` environment variable can be used to control this.
- Compiling to a file with no suffix will now generate an executable (JS) rather
than an object file. This means simple cases like `emcc -o foo foo.c` do the
expected thing and generate an executable.
- System libraries such as libc and libc++ are now included by default at
link time rather than selectively included based on the symbols used in the
input object files. For small programs that don't use any system libraries
this might result in slightly slower link times with the old fastcomp
backend. In order to exclude these libraries build with `-nostdlib` and/or
`-nostdlib++`.

1.39.15: 05/06/2020
-------------------
Expand Down
6 changes: 5 additions & 1 deletion emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,8 @@ def check_human_readable_list(items):
clang_compiler = CC

def is_link_flag(flag):
if flag.startswith('-nostdlib'):
return True
return flag.startswith(('-l', '-L', '-Wl,'))

compile_args = [a for a in newargs if a and not is_link_flag(a)]
Expand Down Expand Up @@ -2296,7 +2298,9 @@ def compile_source_file(i, input_file):
not shared.Settings.SIDE_MODULE: # shared libraries/side modules link no C libraries, need them in parent
extra_files_to_link = system_libs.get_ports(shared.Settings)
if '-nostdlib' not in newargs and '-nodefaultlibs' not in newargs:
extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, stdout_=None, stderr_=None, forced=forced_stdlibs)
# TODO(sbc): Only set link_as_cxx if use_cxx
link_as_cxx = '-nostdlib++' not in newargs
extra_files_to_link += system_libs.calculate([f for _, f in sorted(temp_files)] + extra_files_to_link, in_temp, link_as_cxx, forced=forced_stdlibs)
linker_inputs += extra_files_to_link

# exit block 'calculate system libraries'
Expand Down
3,168 changes: 0 additions & 3,168 deletions system/lib/symbols/asmjs/libc++-mt-noexcept.symbols

This file was deleted.

3,168 changes: 0 additions & 3,168 deletions system/lib/symbols/asmjs/libc++-noexcept.symbols

This file was deleted.

3,183 changes: 0 additions & 3,183 deletions system/lib/symbols/asmjs/libc++.symbols

This file was deleted.

Loading