Lack of support for headers in assebler

gradle-3398
issue-acknowledged

(Pawel) #1

Both C and C++ have a good support for dependencies and used headers during compilation (by CSourceSet and it’s exportedHeaders property).

However it looks like Assembler implementation (by AssemblerSourceSet) doesn’t have both exportedHeaders properties neither support for changed headers. Lack of this feature ends up in a situation, that a change in *.inc file isn’t take into account, so every time clean build should be perform.

Is there a plan to add dependencies/incremental build to assembler and properties like exportedHeaders and .define?


(Sterling Greene) #2

Thanks, I raised GRADLE-3398. I think we’d like assembler to be on par with the other languages, just at the time it was added, it was good enough.

You can define things by directly adding arguments to the assembler.

I think you can work around the .inc issue by adding the .inc files as inputs to the Assemble task. That would at least make it so the compile task will run when the .inc files change.

It would look something like:

model {
   tasks {
      withType(Assemble) {
         inputs.files fileTree("src/asm/include")
      }
   }
}

(Franz Krainer) #3

Hi Sterling,

this is an interesting point we came across in a build process migration which costed quite time.
Is there any plan to change this non-standard behavior in future Gradle releases? Any time line for this issue’s resolution?

Thanks a lot in advance!
BR,
Franz