2 # We want to use rustc's -C linker-plugin-lto, but it passes several arguments
3 # that are not understood by OSX clang/ld64.lld. Specifically, it passes
4 # -plugin-opt* arguments to set optimization levels, which are not supported.
5 # Thus, we intercept the call here, strip the unsupported arguments, and pass
8 for ((i=0; i<"${#args[@]}"; ++i)); do
15 $LDK_CLANG_PATH -flto -O3 -Wl,-O3 "${args[@]}"