From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Build ASL files before C files To: PierreGondois ,devel@edk2.groups.io From: "PierreGondois" X-Originating-Location: Cambridge, England, GB (217.140.106.49) X-Originating-Platform: Windows Firefox 70 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 11 Dec 2019 03:23:48 -0800 References: <23417.1575480745878851638@groups.io> In-Reply-To: <23417.1575480745878851638@groups.io> Message-ID: <18317.1576063428046438569@groups.io> Content-Type: multipart/alternative; boundary="BHpfbtTaqciUt4FKphpd" --BHpfbtTaqciUt4FKphpd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 p= rocess, 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=E2=80=99s source code. > That step cannot be handled in edk2 build since the compilation command = use different build option, so it=E2=80=99s done in a pre-build script. I w= ant to make edk2 build be able to handle such case. So together with your c= ase,=C2=A0 I think we may need a solution that can do: > 1.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Create a module which contains th= e .asl file and the build option to compile that .asl file. > 2.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Find a way to describe the depend= ency 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 m= odule containing .c source files. However I could not find a way to describ= e 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 e= dk2 build system: > That step cannot be handled in edk2 build since the compilation command = use different build option, so it=E2=80=99s 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 mo= dules 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 possib= le and this implies modification in the build system, is there a way I coul= d help? Regards, Pierre --BHpfbtTaqciUt4FKphpd Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello Bob and Liming,
I am coming back to you after re-reading Bob's a= nswer:
> I meet another problem related to .asl file. In one of pla= tforms 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 compil= ation 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.&nbs= p;      Find a way to describe the dependency rela= tion between the module contains .asl and the corresponding module contains= .c file

I split my module into one module containing the .asl f= ile, and a second module containing .c source files. However I could not fi= nd 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 po= ssible using current edk2 build system:
> That step cannot be handl= ed in edk2 build since the compilation command use different build option, = so it’s done in a pre-build script.

I will have to reprodu= ce 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 li= brary classes) using the build system.
Would you have an idea of how t= o 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 --BHpfbtTaqciUt4FKphpd--