ignore -wc-static-runtime if no executable is being linked
simplify envvar()