Fix wasm3 alignment errors and silence some warnings #135

Merged
MartinFouilleul merged 5 commits from fix_wasm3_align_and_warnings into main 2023-09-21 06:52:03 +00:00
Collaborator

Close #129

Close #129
MartinFouilleul added 3 commits 2023-09-19 08:01:41 +00:00
ecf89fa6b2 [macos build]
- Remove the need for -maes, silence warning about ignored option on ARM macs
- Set -mmacos-version-min when building wasm3 to match that of the platform layer and runtime
First-time contributor

Most warnings are gone - complete output as follows:

orca dev build-runtime

Building Orca platform layer...
In file included from src/orca.m:19:
src/graphics/mtl_renderer.m:518:13: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
        f32 checkSamples[CHECK_SAMPLE_COUNT] = { 1. / 6, 2. / 6, 3. / 6, 4. / 6, 5. / 6 };
            ^
src/graphics/mtl_renderer.m:620:13: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
        f32 checkSamples[CHECK_SAMPLE_COUNT] = { 1. / 6, 2. / 6, 3. / 6, 4. / 6, 5. / 6 };
            ^
2 warnings generated.
Building wasm3...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_wasi.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_tracer.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_uvwasi.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_meta_wasi.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_exec.o) has no symbols
Building Orca runtime...
Task completed successfully.
Most warnings are gone - complete output as follows: ``` orca dev build-runtime Building Orca platform layer... In file included from src/orca.m:19: src/graphics/mtl_renderer.m:518:13: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant] f32 checkSamples[CHECK_SAMPLE_COUNT] = { 1. / 6, 2. / 6, 3. / 6, 4. / 6, 5. / 6 }; ^ src/graphics/mtl_renderer.m:620:13: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant] f32 checkSamples[CHECK_SAMPLE_COUNT] = { 1. / 6, 2. / 6, 3. / 6, 4. / 6, 5. / 6 }; ^ 2 warnings generated. Building wasm3... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_wasi.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_tracer.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_uvwasi.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_api_meta_wasi.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: build/lib/libwasm3.a(m3_exec.o) has no symbols Building Orca runtime... Task completed successfully. ```
First-time contributor

changing

const int CHECK_SAMPLE_COUNT = 5;

to

enum { CHECK_SAMPLE_COUNT = 5 };

silenced those ones for me.

changing `const int CHECK_SAMPLE_COUNT = 5;` to `enum { CHECK_SAMPLE_COUNT = 5 };` silenced those ones for me.
MartinFouilleul added 2 commits 2023-09-19 09:48:50 +00:00
Author
Collaborator

Ah yep, I forgot that one. The last commits I pushed should silence everything including the "file has no symbols" warnings from wasm3

Ah yep, I forgot that one. The last commits I pushed should silence everything including the "file has no symbols" warnings from wasm3
MartinFouilleul merged commit 94ce88e272 into main 2023-09-21 06:52:03 +00:00
MartinFouilleul deleted branch fix_wasm3_align_and_warnings 2023-09-21 06:52:04 +00:00
Sign in to join this conversation.
No reviewers
No Label
macOS
windows
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hmn/orca#135
No description provided.