fix --compile=all
option, and some improvements for --strip-ir
#46935
+55
−98
--compile=all
option, and some improvements for --strip-ir
#46935