Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 25, 2017 how to pass -pie flag to dmd(or rdmd or ldc) ? | ||||
---|---|---|---|---|
| ||||
Attachments:
| Can we do this is 1 step? ``` rdmd -offoo.o -c foo.d g++ -o foo foo.o -pie -Wl,--export-dynamic ``` Ideally something like this would be great: ``` rdmd -offoo -extra_flags=-pie foo.d ``` where -extra_flags=flag1,flag2 can takes comma separated options |
January 26, 2017 Re: how to pass -pie flag to dmd(or rdmd or ldc) ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Timothee Cour | On 2017-01-26 04:43, Timothee Cour via Digitalmars-d wrote: > Can we do this is 1 step? > > ``` > rdmd -offoo.o -c foo.d > g++ -o foo foo.o -pie -Wl,--export-dynamic > ``` > > Ideally something like this would be great: > > ``` > rdmd -offoo -extra_flags=-pie foo.d > ``` > > where -extra_flags=flag1,flag2 can takes comma separated options Yeah, I've always wanted to be able to pass flags to the C compiler and not just the linker. -- /Jacob Carlborg |
March 14, 2018 Re: how to pass -pie flag to dmd(or rdmd or ldc) ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On Thursday, 26 January 2017 at 07:38:50 UTC, Jacob Carlborg wrote: > On 2017-01-26 04:43, Timothee Cour via Digitalmars-d wrote: >> Can we do this is 1 step? >> >> ``` >> rdmd -offoo.o -c foo.d >> g++ -o foo foo.o -pie -Wl,--export-dynamic >> ``` >> >> Ideally something like this would be great: >> >> ``` >> rdmd -offoo -extra_flags=-pie foo.d >> ``` >> >> where -extra_flags=flag1,flag2 can takes comma separated options > > Yeah, I've always wanted to be able to pass flags to the C compiler and not just the linker. looks like it's now possible with -Xcc https://github.com/ldc-developers/ldc/pull/2104 (haven't tested yet) |
March 14, 2018 Re: how to pass -pie flag to dmd(or rdmd or ldc) ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to timotheecour | On Wednesday, 14 March 2018 at 01:31:20 UTC, timotheecour wrote: > On Thursday, 26 January 2017 at 07:38:50 UTC, Jacob Carlborg wrote: >> On 2017-01-26 04:43, Timothee Cour via Digitalmars-d wrote: >>> Can we do this is 1 step? >>> >>> ``` >>> rdmd -offoo.o -c foo.d >>> g++ -o foo foo.o -pie -Wl,--export-dynamic >>> ``` >>> >>> Ideally something like this would be great: >>> >>> ``` >>> rdmd -offoo -extra_flags=-pie foo.d >>> ``` >>> >>> where -extra_flags=flag1,flag2 can takes comma separated options >> >> Yeah, I've always wanted to be able to pass flags to the C compiler and not just the linker. > > looks like it's now possible with -Xcc https://github.com/ldc-developers/ldc/pull/2104 (haven't tested yet) Yep, see example here: https://wiki.dlang.org/Build_D_for_Android#Cross-compilation_3 |
Copyright © 1999-2021 by the D Language Foundation