bazelbuild / rules_swift

Bazel rules to build Swift on Apple and Linux platforms
Apache License 2.0
311 stars 135 forks source link

swift_library doesn't expand $(GENDIR) #314

Closed segiddins closed 3 years ago

segiddins commented 5 years ago

I was updating one of my macros to get parity with objc_library, and discovered that $(GENDIR) is silently not expanded in swift_library's copts, whereas objc_library expands it

michaeleisel commented 3 years ago

+1 for this

omarzl commented 3 years ago

+1 I can't expand $(TARGET_CPU) neither

thii commented 3 years ago

Anyone who has a use-case for this, please feel free to send a PR with a fix. This can be done with https://docs.bazel.build/versions/4.0.0/skylark/lib/ctx.html#expand_make_variables.