[binaries]
c = 'emcc'
cpp = 'em++'
ld = 'wasm-ld'
ar = 'emar'
ranlib = 'emranlib'
make = 'emmake'
cmake = 'emcmake'
[host_machine]
system = 'emscripten'
cpu_family = 'wasm32'
cpu = 'wasm32'
endian = 'little'
[properties]
needs_exe_wrapper = true
Produced the following output:
The Meson build system
Version: 0.59.4
Source dir: /tmp/ad
Build dir: /tmp/ad/build
Build type: cross build
Project name: myexec
Project version: undefined
C compiler for the host machine: emcc (emscripten 3.1.3 "emsdk.sh")
C linker for the host machine: emcc ld.wasm unknown version
C compiler for the build machine: ccache cc (gcc 11.2.1 "cc (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7)")
C linker for the build machine: cc ld.bfd 2.37-10
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: wasm32
Host machine cpu: wasm32
Target machine cpu family: wasm32
Target machine cpu: wasm32
Checking for size of "char" : -1
Checking for size of "short" : -1
Checking for size of "int" : -1
Checking for size of "void*" : -1
Checking for size of "long" : -1
Build targets in project: 0
Found ninja-1.10.2 at /usr/bin/ninja
WARNING: Cross file does not specify strip binary, result will not be stripped.
WARNING: Cross file does not specify strip binary, result will not be stripped.
Expected behavior
Return the size of the types. E.g.:
Checking for size of "char" : 1
Checking for size of "short" : 2
Checking for size of "int" : 4
Checking for size of "void*" : 4
Checking for size of "long" : 4
Describe the bug When doing a cross-build with emscripten, compiler.sizeof() returns -1 for any type passed.
To Reproduce
Build file used:
meson.build
Cross-File used:
emscripten.conf
Produced the following output:
Expected behavior Return the size of the types. E.g.:
system parameters