Hey sorry for reviving this old thread, but I'm looking for the exact opposite.
Passing a specific flag only to my build script compilation...
I'm compiling a build script in alpine that uses bindgen (and thus links dynamically to clang... static linking has other issues), but I can't set target-feature=-crt-static for thr build script 😦