<div dir="ltr"><div><div style="font-size:12.8px">question 1:</div><div style="font-size:12.8px"><br></div><span style="font-size:12.8px">is there a way to pass linker flags?</span><div style="font-size:12.8px">dmd -Wl=comma_separated_linker_<wbr>flags<br></div><div style="font-size:12.8px">eg:</div><div style="font-size:12.8px">dmd -Wl=-lbar,-Ldir,--export-<wbr>dynamic,-pie</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">(same functionality as clang++ -Wl,-lbar,-Ldir,--export-<wbr>dynamic,-pie)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">If not could we support it? Would make a lot of things easier.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">question 2:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Furthermore, on linux, not sure I can pass the -pie flag to dmd ; currently this works:</div><div style="font-size:12.8px"><div><br></div><div>```</div><div>dmd -of=${filelib}.o -c ${FLAGS} fun.d</div><div>clang++ -o ${filelib} -pie ${filelib}.o -Wl,-lphobos2,--export-dynamic<br></div></div><div style="font-size:12.8px">```</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">but not:</div><div style="font-size:12.8px"><span class="gmail-m_5468225723061670957gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>dmd -of=${filelib} ${FLAGS} -L-pie -L--export-dynamic fun.d<br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">with question 1 solved, this should automatically work via:</div><div style="font-size:12.8px">dmd -of=${filelib} ${FLAGS} -Wl=-pie,--export-dynamic fun.d</div></div></div>