Hi Pierre,

 

Currently, I don’t have good solution for this issue. I considered the solution that I mentioned before, I don’t think that is a good solution either. As you mentioned that to split one feature into 2 modules is not good, and now there is no way to describe the dependency of those two modules.

 

I think if we can describe the dependency between source files in INF file. For example,

 

[Sources.IA32]

  asl_source.asl

  c_source.c | asl_source.asl

 

The build tool will generate the dependency that says c_source.c depend on the output of asl_source.asl in Makefile?

 

What do you think?

 

Would you submit a BZ to track this issue?

 

Thanks,

Bob

 

From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of PierreGondois
Sent: Wednesday, December 11, 2019 7:24 PM
To: PierreGondois <pierre.gondois@arm.com>; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Build ASL files before C files

 

Hello Bob and Liming,
I am coming back to you after re-reading Bob's answer:
> I meet another problem related to .asl file. In one of platforms build process, there is a step which need to compile a .asl file a .h file firstly and that .h file will be included by a module’s source code.
> That step cannot be handled in edk2 build since the compilation command use different build option, so it’s done in a pre-build script. I want to make edk2 build be able to handle such case. So together with your case,  I think we may need a solution that can do:
> 1.       Create a module which contains the .asl file and the build option to compile that .asl file.
> 2.       Find a way to describe the dependency relation between the module contains .asl and the corresponding module contains .c file

I split my module into one module containing the .asl file, and a second module containing .c source files. However I could not find a way to describe a dependency between the two modules (as suggested in the second step).
This part of Bob's answer makes me think it's not possible using current edk2 build system:
> That step cannot be handled in edk2 build since the compilation command use different build option, so it’s done in a pre-build script.

I will have to reproduce the solution to multiple folders and for multiple platforms. Using a pre-build script would not be a scalable solution.
I would need to create a dependency between file extensions (or between modules which are edk2 library classes) using the build system.
Would you have an idea of how to do it, or if this is currently not possible and this implies modification in the build system, is there a way I could help?

Regards,
Pierre