Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

genrule macros cannot target flavor of buck invocation #2633

Open
jstaahl opened this issue Jul 22, 2021 · 1 comment
Open

genrule macros cannot target flavor of buck invocation #2633

jstaahl opened this issue Jul 22, 2021 · 1 comment

Comments

@jstaahl
Copy link

jstaahl commented Jul 22, 2021

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:

  1. buck build //MyApp:MyApp#iphoneos-arm64
    or
  2. 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.

@KapJI
Copy link
Member

KapJI commented Aug 24, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants