Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
使用 @response_file_path 减少命令行传递链接参数数量
// response_file
-demangle -lto_library /Applications/ -dynamic -arch arm64 -platform_version macos 11.3.0 11.3 -syslibroot /Applications/ -o /Users/yahaha/Desktop/lto-example/foo/build/foo/Build/Products/Release/foo -L/Users/yahaha/Desktop/lto-example/foo/build/foo/Build/Products/Release -filelist /Users/yahaha/Desktop/lto-example/foo/build/foo/Build/Intermediates.noindex/ -object_path_lto /Users/yahaha/Desktop/lto-example/foo/build/foo/Build/Intermediates.noindex/ -print_statistics -save-temps -lbar -no_adhoc_codesign -dependency_info /Users/yahaha/Desktop/lto-example/foo/build/foo/Build/Intermediates.noindex/ -lSystem /Applications/ -F/Users/yahaha/Desktop/lto-example/foo/build/foo/Build/Products/Release
// ld 命令
ld @response_file
Inserts contents of file at response_file_path into argu-
ments. This allows for linker command line args to be store
in a file. Note: ld is normally invoked through clang, and
clang also interprets @file on the command line. To have
clang ignore the @file and pass it through to ld, use
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment