From: Martin Jansa Date: Thu, 2 Apr 2026 00:14:58 +0000 (+0200) Subject: native/cross: ar wrapper: don't prepend 'D' when @ is used X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0120b464146c0909fc7876efbc244fb93631f802;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git native/cross: ar wrapper: don't prepend 'D' when @ is used In some cases bazel-native build calls ar with @ - read options from syntax, where the ar params are generated in *.param file by separate bazel action before ar is called. Unfortunately this intercept breaks that syntax by prepending D like: $ ./ar-intercept @foo argv before: ['./ar-intercept', '@foo'] argv after: ['./ar-intercept', 'D@foo'] ./ar-intercept: invalid option -- '@' Usage: ./ar-intercept [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin ] [member-name] [count] archive-file file... ./ar-intercept -M [] [member-name] [count] archive-file file... ./ar-intercept -M [, lets assume the caller uses D already (bazel uses 'rcsD' by default). * Ar flags for combining object files into archives. If this is not set, it * defaults to "rcsD". * TODO(b/37271982): Remove after blaze with ar action_config release Signed-off-by: Martin Jansa Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/scripts/native-intercept/ar b/scripts/native-intercept/ar index dcc623e3ed5..fd266c19d47 100755 --- a/scripts/native-intercept/ar +++ b/scripts/native-intercept/ar @@ -19,6 +19,11 @@ argv = sys.argv if argv[1].startswith('--'): # No modifier given None +elif argv[1][0] == '@': + # Reading parameters from @file, we can try to inject D on the first line as well + # but modifying input files seems a bit too far for this intercept, bazel-native + # uses it but with rcsD by default + None else: # remove the optional '-' if argv[1][0] == '-':