LDC 1.40.0-beta1

Dakota dakota at gmail.com
Thu Aug 22 10:50:44 UTC 2024


On Tuesday, 20 August 2024 at 23:21:34 UTC, kinke wrote:
> The 2nd beta has just been released, including the latest 
> upstream `stable` fixes and a LDC-specific regression fix 
> (introduced in v1.31, for under-alignment edge cases): 
> https://github.com/ldc-developers/ldc/releases/tag/v1.40.0-beta2

Thanks for the great work.


Today I try wasm with ldc2, can not pass the linker to it:


```sh
ldc2 -linker=/user/local/wasi/bin/wasm-ld 
-mtriple=wasm32-unknown-wasi test.d -v


ldc2 -mtriple=wasm32-unknown-wasi test.d -v
```

I try with `-linker`, `-gcc` and without them. all results in 
same case:

```sh
semantic  test
semantic2 test
semantic3 test
GC stats  1M used, 11M free, 12M total
code      test
lld test.o -o test.wasm -z stack-size=1048576 --stack-first 
--export-dynamic --gc-sections
lld: error: entry symbol not defined (pass --no-entry to 
suppress): _start
Error: linking with LLD failed
```

I dont event have `ld.lld` in my path, and I also try rename 
wasm-ld .  all turn out use lld here. and I can not modify the 
args `-z stack-size=1048576 --stack-first --export-dynamic 
--gc-sections`

Is this hardcoded in ldc2 ?

I find https://github.com/ldc-developers/ldc/pull/2951, I guess 
it will search wasm-ld from ENV path.  but after I rename wasm-ld 
  the results is same.


any suggestion how can I pass my own linker here?





More information about the Digitalmars-d-announce mailing list