buck
buck copied to clipboard
genrule macros cannot target flavor of buck invocation
It appears that a genrule which uses the $(location <target>) macro has no way of getting the location of the output of the specified target for the flavor which was used to invoke buck in the first place.
In other words, if I invoke buck with:
-
buck build //MyApp:MyApp#iphoneos-arm64or -
buck build //MyApp:MyApp#iphonesimulator-x86_64
I have no way of creating a genrule which when it does a $(location <target>) macro expansion targets the #iphoneos-arm64 flavor in case 1 and targets the #iphonesimulator-x86_64 flavor in case 2.
I think you can set default flavor instead of passing it as target flavor, this can done in invocation with --config option. Then genrule should also use it.