> Case in point, the ASSERTIONS setting is indeed a link-only setting, so 
passing it during compilation has no effect.   If you look at settings.js 
you can see its already marked with `// [link]` to signal this.  

Oops, interesting, well in that case the warning did exactly what it's 
supposed to do, good work :) I'll fix my build scripts.

On Thursday, 6 May 2021 at 17:37:30 UTC+2 [email protected] wrote:

> I landed a change as part of 2.0.19 that started reporting warning for 
> link-time-only settings used during compilation.  There some oversights 
> (false positives) that I'm trying to correct today and release 2.0.20:  
> https://github.com/emscripten-core/emscripten/pull/14104
>
> Part of the reason for doing this is to clear up some of the confusion 
> around which settings are for the compiler and which are for the linker, 
> not just in the user community but also within the emscripten codebase 
> itself.
>
> Case in point, the ASSERTIONS setting is indeed a link-only setting, so 
> passing it during compilation has no effect.   If you look at settings.js 
> you can see its already marked with `// [link]` to signal this.  
>
> Hopefully this isn't too annoying to folks and those who want to continue 
> to pass all their link flags during compilation can add 
> `-Wno-unused-command-line-argument` (just like they would need to with 
> clang to avoid such warnings).   
>
> cheers,
> sam
>
> On Thu, May 6, 2021 at 8:19 AM Floh <[email protected]> wrote:
>
>> Ok, that ASSERTION warning is new in 2.0.19, 2.0.18 is still fine.
>>
>> The slight size increase must have happened in an earlier version, from 
>> 2.0.18 to 2.0.19 it's expected "noise":
>>
>> 2.0.18: 640 KB
>>
>> 2.0.19: 641 KB
>>
>> On Thursday, 6 May 2021 at 17:04:38 UTC+2 Floh wrote:
>>
>>> I'm getting a warning both in em++ and emcc after the upgrade for each 
>>> source file:
>>>
>>> em++: warning: linker setting ignored during compilation: 'ASSERTIONS' 
>>> [-Wunused-command-line-argument]
>>>
>>> emcc: warning: linker setting ignored during compilation: 'ASSERTIONS' 
>>> [-Wunused-command-line-argument]
>>>
>>> This is used in the command line switch "-s ASSERTIONS=0", and the host 
>>> system is macOS.
>>>
>>> Looking into settings.js, the ASSERTIONS settings variable is still 
>>> there, so I'm not sure what would cause the warning.
>>>
>>> Isn't the ASSERTIONS options needed for compilation of regular object 
>>> files, not just in the linker step?
>>>
>>> This is a verbose command line as example:
>>>
>>> [4/17] /Users/floh/projects/fips-sdks/emsdk/upstream/emscripten/em++  
>>> -I/Users/floh/projects/chips -I/Users/floh/projects/fips-imgui/imgui 
>>> -I/Users/floh/projects/sokol -I/Users/floh/projects/sokol/util -s 
>>> DISABLE_EXCEPTION_CATCHING=1  -fno-exceptions -fno-rtti -std=c++11 
>>> -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unknown-pragmas 
>>> -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual 
>>> -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue 
>>> -Wno-inconsistent-missing-override -Wno-warn-absolute-paths 
>>> -Wno-expansion-to-defined  -flto -s ASSERTIONS=0 -O3 -DNDEBUG 
>>> -Wno-type-limits -Wno-missing-field-initializers -std=gnu++11 -MD -MT 
>>> fips-imgui_imgui/CMakeFiles/imgui.dir/imgui/imgui_tables.cpp.obj -MF 
>>> fips-imgui_imgui/CMakeFiles/imgui.dir/imgui/imgui_tables.cpp.obj.d -o 
>>> fips-imgui_imgui/CMakeFiles/imgui.dir/imgui/imgui_tables.cpp.obj -c 
>>> /Users/floh/projects/fips-imgui/imgui/imgui_tables.cpp
>>> em++: warning: linker setting ignored during compilation: 'ASSERTIONS' 
>>> [-Wunused-command-line-argument]
>>>
>>> Otherwise no obvious problems. The wasm file got a bit bigger, from 
>>> 623KB to 641KB, but in this case the previous WASM is from mid-January, so 
>>> this might also be attributes to LLVM updates.
>>>
>>> Is the LTO about the build tools being compiled with LTO enabled, or 
>>> about Emscripten release build enabling LTO by default? (I always had LTO 
>>> enabled, so I wouldn't expect much difference in runtime performance), in 
>>> either case build times and runtime performance seems to be about the same 
>>> for me.
>>>
>>> I'll check previous SDK versions now to see when this ASSERTIONS warning 
>>> first appeared.
>>>
>>> Cheers,
>>> -Floh.
>>> On Wednesday, 5 May 2021 at 02:27:12 UTC+2 [email protected] wrote:
>>>
>>>> Hi emscripten users,
>>>> Emscripten version 2.0.19 has just been released in emsdk. You can 
>>>> install it in the usual way (e.g.  ./emsdk install 2.0.19). 
>>>> But this time we are also testing a new release build using higher 
>>>> optimization levels. We intend to make it the default soon, but because 
>>>> the 
>>>> build process is slightly different, we're hoping some of you can try it 
>>>> out first. If you install the '2.0.19-lto' tag (instead of 2.0.19) you'll 
>>>> get the optimized build. Please try it out and let us know if you 
>>>> experience issues (or if you see meaningful compile or link performance 
>>>> gains).
>>>> Thanks!
>>>> -Derek
>>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/emscripten-discuss/05c8f044-eb12-47c7-aafe-5b103c39cebdn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/emscripten-discuss/05c8f044-eb12-47c7-aafe-5b103c39cebdn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/40eb91bb-dc21-48b6-b0b5-b941ab5bc637n%40googlegroups.com.

Reply via email to