chore: leanc: do not pass linking flags when not linking

Which suppresses a warning that may or may not have defeated ccache...?
This commit is contained in:
Sebastian Ullrich 2021-01-30 18:48:33 +01:00
parent 1941081059
commit a852b64bcd

View file

@ -22,6 +22,7 @@ ldflags_ext=(@LEANC_STATIC_LINKER_FLAGS@)
for arg in "$@"; do
# passed -shared ~> switch to shared linker flags
[[ $arg == "-shared" ]] && ldflags_ext=(@LEANC_SHARED_LINKER_FLAGS@)
[[ $arg == "-c" ]] && ldflags=() && ldflags_ext=()
[[ $arg == "-print-cflags" ]] && echo "${cflags[@]} ${cflags_ext[@]}" && exit
[[ $arg == "-print-ldflags" ]] && echo "${ldflags_ext[@]} ${ldflags[@]}" && exit
done