Skip to content

Commit c51c02a

Browse files
committed
Merge branch 'master' into libgif
2 parents d3324af + e0e4f4f commit c51c02a

File tree

117 files changed

+1765
-1619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1765
-1619
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ jobs:
399399
steps:
400400
- run-tests:
401401
# also add a few asan tests
402-
test_targets: "wasm2 asan.test_embind* asan.test_abort_on_exceptions asan.test_ubsan_full_left_shift_fsanitize_integer"
402+
test_targets: "wasm2 asan.test_embind* asan.test_abort_on_exceptions asan.test_ubsan_full_left_shift_fsanitize_integer asan.test_pthread*"
403403
test-wasm3:
404404
executor: bionic
405405
steps:

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,12 @@ a license to everyone to use it as detailed in LICENSE.)
525525
* Jean-Sébastien Nadeau <mundusnine@gmail.com> (copyright owned by Foundry Interactive Inc.)
526526
* Wouter van Oortmerssen <wvo@google.com> (copyright owned by Google, LLC)
527527
* Alexey Sokolov <sokolov@google.com> (copyright owned by Google, LLC)
528+
* Lukas Rieger <rieger@progress-psd.com>
528529
* Ivan Romanovski <ivan.romanovski@gmail.com>
529530
* Max Brunsfeld <maxbrunsfeld@gmail.com>
530531
* Basil Fierz <basil.fierz@hotmail.com>
531532
* Rod Hyde <rod@badlydrawngames.com>
532533
* Aleksey Kliger <aleksey@lambdageek.org> (copyright owned by Microsoft, Inc.)
533534
* Nicolas Ollinger <nopid@free.fr>
534535
* Michael R. Crusoe <crusoe@debian.org>
536+
* Thomas Ballinger <thomasballinger@gmail.com>

ChangeLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ See docs/process.md for more on how version tagging works.
2020

2121
Current Trunk
2222
-------------
23+
- Stop overriding CMake default flags based on build type. This will
24+
result in builds that are more like CMake does on other platforms. You
25+
may notice that `RelWithDebInfo` will now include debug info (it did not
26+
before, which appears to have been an error), and that `Release` will
27+
use `-O3` instead of `-O2` (which is a better choice anyhow). (#13083)
2328

2429
2.0.11: 12/17/2020
2530
------------------
31+
- `emcc -v` no longer forces the running the sanity checks. Sanity checks
32+
are always run on first use or can be forced with `--check` or by setting
33+
`EMCC_DEBUG` is set in the environment.
2634
- An upstream LLVM regression with global initializer linking has been fixed
2735
(#13038).
2836
- Remove a racy unneeded assertion about async dynamic linking (#13060).

cmake/Modules/Platform/Emscripten.cmake

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -268,23 +268,6 @@ set(CMAKE_HAVE_SYS_PRCTL_H 1)
268268
set(CMAKE_WORDS_BIGENDIAN 0)
269269
set(CMAKE_DL_LIBS)
270270

271-
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELEASE")
272-
set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_MINSIZEREL")
273-
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_C_FLAGS_RELWITHDEBINFO")
274-
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELEASE")
275-
set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_MINSIZEREL")
276-
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG -O2" CACHE STRING "Emscripten-overridden CMAKE_CXX_FLAGS_RELWITHDEBINFO")
277-
278-
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELEASE")
279-
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_MINSIZEREL")
280-
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO")
281-
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELEASE")
282-
set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL")
283-
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO")
284-
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "-O2" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELEASE")
285-
set(CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL "-Os" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL")
286-
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Emscripten-overridden CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO")
287-
288271
function(em_validate_asmjs_after_build target)
289272
message(WARNING "em_validate_asmjs_after_build no longer exists")
290273
endfunction()

docs/emcc.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,16 +401,18 @@ Options that are modified or new in *emcc* are listed below:
401401
"-v"
402402
Turns on verbose output.
403403

404-
This will pass "-v" to *Clang*, and also enable "EMCC_DEBUG" to
405-
generate intermediate files for the compiler's various stages. It
406-
will also run Emscripten's internal sanity checks on the toolchain,
407-
etc.
404+
This will print the internal sub-commands run by emscripten as well
405+
as "-v" to *Clang*.
408406

409407
Tip:
410408

411409
"emcc -v" is a useful tool for diagnosing errors. It works with
412410
or without other arguments.
413411

412+
"--check"
413+
Runs Emscripten's internal sanity checks and reports any issues
414+
with the current configuration.
415+
414416
"--cache"
415417
Sets the directory to use as the Emscripten cache. The Emscripten
416418
cache is used to store pre-built versions of "libc", "libcxx" and

embuilder.py

100755100644
Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ def main():
142142
force = True
143143

144144
# process tasks
145-
libname = system_libs.Ports.get_lib_name
146-
147145
auto_tasks = False
148146
tasks = args.targets
149147
if 'SYSTEM' in tasks:
@@ -183,59 +181,59 @@ def main():
183181
shared.Cache.erase_file('generated_struct_info.json')
184182
emscripten.generate_struct_info()
185183
elif what == 'icu':
186-
build_port('icu', libname('libicuuc'))
184+
build_port('icu', 'libicuuc.a')
187185
elif what == 'zlib':
188186
shared.Settings.USE_ZLIB = 1
189187
build_port('zlib', 'libz.a')
190188
shared.Settings.USE_ZLIB = 0
191189
elif what == 'bzip2':
192190
build_port('bzip2', 'libbz2.a')
193191
elif what == 'bullet':
194-
build_port('bullet', libname('libbullet'))
192+
build_port('bullet', 'libbullet.a')
195193
elif what == 'vorbis':
196-
build_port('vorbis', libname('libvorbis'))
194+
build_port('vorbis', 'libvorbis.a')
197195
elif what == 'ogg':
198-
build_port('ogg', libname('libogg'))
196+
build_port('ogg', 'libogg.a')
199197
elif what == 'giflib':
200-
build_port('giflib', libname('libgif'))
198+
build_port('giflib', 'libgif.a')
201199
elif what == 'libjpeg':
202-
build_port('libjpeg', libname('libjpeg'))
200+
build_port('libjpeg', 'libjpeg.a')
203201
elif what == 'libpng':
204-
build_port('libpng', libname('libpng'))
202+
build_port('libpng', 'libpng.a')
205203
elif what == 'sdl2':
206-
build_port('sdl2', libname('libSDL2'))
204+
build_port('sdl2', 'libSDL2.a')
207205
elif what == 'sdl2-mt':
208206
shared.Settings.USE_PTHREADS = 1
209-
build_port('sdl2', libname('libSDL2-mt'))
207+
build_port('sdl2', 'libSDL2-mt.a')
210208
shared.Settings.USE_PTHREADS = 0
211209
elif what == 'sdl2-gfx':
212-
build_port('sdl2_gfx', libname('libSDL2_gfx'))
210+
build_port('sdl2_gfx', 'libSDL2_gfx.a')
213211
elif what == 'sdl2-image':
214-
build_port('sdl2_image', libname('libSDL2_image'))
212+
build_port('sdl2_image', 'libSDL2_image.a')
215213
elif what == 'sdl2-image-png':
216214
shared.Settings.SDL2_IMAGE_FORMATS = ["png"]
217-
build_port('sdl2_image', libname('libSDL2_image_png'))
215+
build_port('sdl2_image', 'libSDL2_image_png.a')
218216
shared.Settings.SDL2_IMAGE_FORMATS = []
219217
elif what == 'sdl2-image-jpg':
220218
shared.Settings.SDL2_IMAGE_FORMATS = ["jpg"]
221-
build_port('sdl2_image', libname('libSDL2_image_jpg'))
219+
build_port('sdl2_image', 'libSDL2_image_jpg.a')
222220
shared.Settings.SDL2_IMAGE_FORMATS = []
223221
elif what == 'sdl2-net':
224-
build_port('sdl2_net', libname('libSDL2_net'))
222+
build_port('sdl2_net', 'libSDL2_net.a')
225223
elif what == 'sdl2-mixer':
226224
old_formats = shared.Settings.SDL2_MIXER_FORMATS
227225
shared.Settings.SDL2_MIXER_FORMATS = []
228-
build_port('sdl2_mixer', libname('libSDL2_mixer'))
226+
build_port('sdl2_mixer', 'libSDL2_mixer.a')
229227
shared.Settings.SDL2_MIXER_FORMATS = old_formats
230228
elif what == 'sdl2-mixer-ogg':
231229
old_formats = shared.Settings.SDL2_MIXER_FORMATS
232230
shared.Settings.SDL2_MIXER_FORMATS = ["ogg"]
233-
build_port('sdl2_mixer', libname('libSDL2_mixer_ogg'))
231+
build_port('sdl2_mixer', 'libSDL2_mixer_ogg.a')
234232
shared.Settings.SDL2_MIXER_FORMATS = old_formats
235233
elif what == 'sdl2-mixer-mp3':
236234
old_formats = shared.Settings.SDL2_MIXER_FORMATS
237235
shared.Settings.SDL2_MIXER_FORMATS = ["mp3"]
238-
build_port('sdl2_mixer', libname('libSDL2_mixer_mp3'))
236+
build_port('sdl2_mixer', 'libSDL2_mixer_mp3.a')
239237
shared.Settings.SDL2_MIXER_FORMATS = old_formats
240238
elif what == 'freetype':
241239
build_port('freetype', 'libfreetype.a')
@@ -246,17 +244,17 @@ def main():
246244
build_port('harfbuzz', 'libharfbuzz-mt.a')
247245
shared.Settings.USE_PTHREADS = 0
248246
elif what == 'sdl2-ttf':
249-
build_port('sdl2_ttf', libname('libSDL2_ttf'))
247+
build_port('sdl2_ttf', 'libSDL2_ttf.a')
250248
elif what == 'cocos2d':
251-
build_port('cocos2d', libname('libcocos2d'))
249+
build_port('cocos2d', 'libcocos2d.a')
252250
elif what == 'regal':
253-
build_port('regal', libname('libregal'))
251+
build_port('regal', 'libregal.a')
254252
elif what == 'regal-mt':
255253
shared.Settings.USE_PTHREADS = 1
256-
build_port('regal', libname('libregal-mt'))
254+
build_port('regal', 'libregal-mt.a')
257255
shared.Settings.USE_PTHREADS = 0
258256
elif what == 'boost_headers':
259-
build_port('boost_headers', libname('libboost_headers'))
257+
build_port('boost_headers', 'libboost_headers.a')
260258
else:
261259
logger.error('unfamiliar build target: ' + what)
262260
return 1

0 commit comments

Comments
 (0)