Skip to content

Commit

Permalink
Fix typos. (#10915)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Apr 14, 2020
1 parent 82e8463 commit 938465e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Current Trunk

v1.39.12: 04/09/2020
--------------------
- Pass linker flags dirctly to wasm-ld by default. We still filter out certain
flags explcitly. If there are other flags that it would be useful for us
- Pass linker flags directly to wasm-ld by default. We still filter out certain
flags explicitly. If there are other flags that it would be useful for us
to ignore we can add them to the list of ignored flags.
- Optionally support 2GB+ heap sizes. To do this we make the JS code have unsigned
pointers (we need all 32 bits in them now), which can slightly increase code
size (>>> instead of >>). This only happens when the heap size may be over
2GB, which you must opt into explicity, by setting `MAXIMUM_MEMORY` to a
2GB, which you must opt into explicitly, by setting `MAXIMUM_MEMORY` to a
higher value (i.e. by default you do not get support for 2GB+ heaps).
See #10601
- `--llvm-lto` flag is now ignored when using the upstream llvm backend.
Expand Down
4 changes: 2 additions & 2 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
'-whole-archive', '-no-whole-archive'
)

# Maps to true if the the flag takes an argument
# Maps to true if the flag takes an argument
UNSUPPORTED_LLD_FLAGS = {
# macOS-specific linker flag that libtool (ltmain.sh) will if macOS is detected.
'-bind_at_load': False,
Expand Down Expand Up @@ -2257,7 +2257,7 @@ def compile_source_file(i, input_file):
if shared.Settings.SIDE_MODULE:
exit_with_error('SIDE_MODULE must only be used when compiling to an executable shared library, and not when emitting an object file. That is, you should be emitting a .wasm file (for wasm) or a .js file (for asm.js). Note that when compiling to a typical native suffix for a shared library (.so, .dylib, .dll; which many build systems do) then Emscripten emits an object file, which you should then compile to .wasm or .js with SIDE_MODULE.')
if final_suffix.lower() in ('.so', '.dylib', '.dll'):
diagnostics.warning('emcc', 'When Emscripten compiles to a typical native suffix for shared libraries (.so, .dylib, .dll) then it emits an object file. You should then compile that to an emscripten SIDE_MODULE (using that flag) with suffix .wasm (for wasm) or .js (for asm.js). (You may also want to adapt your build system to emit the more standard suffix for a an object file, \'.bc\' or \'.o\', which would avoid this warning.)')
diagnostics.warning('emcc', 'When Emscripten compiles to a typical native suffix for shared libraries (.so, .dylib, .dll) then it emits an object file. You should then compile that to an emscripten SIDE_MODULE (using that flag) with suffix .wasm (for wasm) or .js (for asm.js). (You may also want to adapt your build system to emit the more standard suffix for an object file, \'.bc\' or \'.o\', which would avoid this warning.)')
logger.debug('link_to_object: ' + str(linker_inputs) + ' -> ' + specified_target)
if len(temp_files) == 1:
temp_file = temp_files[0][1]
Expand Down
2 changes: 1 addition & 1 deletion site/source/docs/api_reference/emscripten.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Defines
}, arr);
.. note::
- As of Emscripten ``1.30.4``, the contents of ``EM_ASM`` code blocks appear inside the normal JS file, and as result, Closure compiler and other JavaScript minifiers will be able to operate on them. You may need to use safety quotes in some places (``a['b']`` instead of ``a.b``) to avoid minification fro occurring.
- As of Emscripten ``1.30.4``, the contents of ``EM_ASM`` code blocks appear inside the normal JS file, and as result, Closure compiler and other JavaScript minifiers will be able to operate on them. You may need to use safety quotes in some places (``a['b']`` instead of ``a.b``) to avoid minification from occurring.
- The C preprocessor does not have an understanding of JavaScript tokens, and as a result, if the ``code`` block contains a comma character ``,``, it may be necessary to wrap the code block inside parentheses. For example, code ``EM_ASM(return [1,2,3].length);`` will not compile, but ``EM_ASM((return [1,2,3].length));`` does.

.. c:macro:: EM_ASM_INT(code, ...)
Expand Down
2 changes: 1 addition & 1 deletion site/source/docs/api_reference/html5.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ Struct
By default, when ``explicitSwapControl`` is in its default state ``false``, rendered WebGL content is implicitly presented (displayed to the user) on the canvas when the event handler that renders with WebGL returns back to the browser event loop. If ``explicitSwapControl`` is set to ``true``, rendered content will not be displayed on screen automatically when event handler function finishes, but the control of swapping is given to the user to manage, via the ``emscripten_webgl_commit_frame()`` function.
In order to be able to set ``explicitSwapControl==true``, support for it must explicitly be enabled either 1) via adding the ``-s OFFSCREEN_FRAMEBUFFER=1`` Emscripten linker flag, and enabling ``renderViaOffscreenBackBuffer==1``, or 2) via adding the the linker flag ``-s OFFSCREENCANVAS_SUPPORT=1``, and running in a browser that supports OffscreenCanvas.
In order to be able to set ``explicitSwapControl==true``, support for it must explicitly be enabled either 1) via adding the ``-s OFFSCREEN_FRAMEBUFFER=1`` Emscripten linker flag, and enabling ``renderViaOffscreenBackBuffer==1``, or 2) via adding the linker flag ``-s OFFSCREENCANVAS_SUPPORT=1``, and running in a browser that supports OffscreenCanvas.
.. c:member:: EM_BOOL renderViaOffscreenBackBuffer
Expand Down
2 changes: 1 addition & 1 deletion src/library_html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ var LibraryJSEvents = {
getTargetThreadForEventCallback: function(targetThread) {
switch(targetThread) {
case {{{ cDefine('EM_CALLBACK_THREAD_CONTEXT_MAIN_BROWSER_THREAD') }}}: return 0; // The event callback for the current event should be called on the main browser thread. (0 == don't proxy)
case {{{ cDefine('EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD') }}}: return PThread.currentProxiedOperationCallerThread; // The event callback for the current event should be backproxied to the the thread that is registering the event.
case {{{ cDefine('EM_CALLBACK_THREAD_CONTEXT_CALLING_THREAD') }}}: return PThread.currentProxiedOperationCallerThread; // The event callback for the current event should be backproxied to the thread that is registering the event.
default: return targetThread; // The event callback for the current event should be proxied to the given specific thread.
}
},
Expand Down
6 changes: 3 additions & 3 deletions src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ var PROXY_TO_WORKER_FILENAME = '';
//
// This proxies Module['canvas'], if present, and if OFFSCREEN_CANVAS support
// is enabled. This has to happen because this is the only chance - this browser
// main thread does the the only pthread_create call that happens on
// main thread does the only pthread_create call that happens on
// that thread, so it's the only chance to transfer the canvas from there.
var PROXY_TO_PTHREAD = 0;

Expand Down Expand Up @@ -1777,8 +1777,8 @@ var USE_OFFSET_CONVERTER = 0;

// If set to 1, the JS compiler is run before wasm-ld so that the linker can
// report undefined symbols within the binary. Without this option that linker
// doesn't know which symmbols might be defined JS and so reporting of undefined
// symbols is deleyed until the JS compiler is run.
// doesn't know which symbols might be defined JS and so reporting of undefined
// symbols is delayed until the JS compiler is run.
// [link]
var LLD_REPORT_UNDEFINED = 0;

Expand Down
4 changes: 2 additions & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -6417,11 +6417,11 @@ def test_zzz_cases(self):
self.set_setting('EXIT_RUNTIME', 1)

# These tests don't end up linking with libc due to a behaviour in emcc
# where the llvm-link step is skipped when the the input is a single
# where the llvm-link step is skipped when the input is a single
# object file. Since most of them `printf` (which comes from JS) but
# depends on `strlen` (which comes from musl) these tests almost all
# have an undefined `strlen`, which happens to not get called.
# TODO(sbc): Remove the specical case from emcc what bypasses llvm-link
# TODO(sbc): Remove the special case from emcc what bypasses llvm-link
# and then remove this line?
self.set_setting('ERROR_ON_UNDEFINED_SYMBOLS', 0)
self.set_setting('WARN_ON_UNDEFINED_SYMBOLS', 0)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -10522,7 +10522,7 @@ def test_non_wasm_without_wasm_in_vm(self):
def test_compile_only_with_object_extension(self):
# Emscripten supports compiling to an object file when the output has an
# object extension.
# Most compilers require the `-c` to be explict.
# Most compilers require the `-c` to be explicit.
run_process([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-c', '-o', 'hello1.o'])
err = run_process([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-o', 'hello2.o'], stderr=PIPE).stderr
self.assertContained('warning: Assuming object file output in the absence of `-c`', err)
Expand Down

0 comments on commit 938465e

Please sign in to comment.