From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::235; helo=mail-io0-x235.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1A3EC210C0F6C for ; Mon, 2 Jul 2018 04:15:14 -0700 (PDT) Received: by mail-io0-x235.google.com with SMTP id r24-v6so14380099ioh.9 for ; Mon, 02 Jul 2018 04:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AsbIUkbVRLiUg4a24G2060lWij36hKA9Muc7hWTae/Q=; b=c+8SaaC0gRpVw38dFAYK8Q4LuQcpb/23A0GDxdmy5TtBV9XclhQZmn8+LmMknoFUf4 Vb40Aup/EN9sk45hGYX8s7MAdM4DQb0wYqbVH2rq9+Wu14P3GCs9dSVytM8ZFpb+oQ0f 1rIVqkWwDcPbC8mJVbwSJyayprZV/Uvy2RYAwKUBV9uWTKACDrQAIe51OJKd1CD2R89F I+HAK+o10bhRM3Qe1yH8NzGfu8bqG6+swQn2Z29xNuksy4v92RlNbLOy2wD0K836C52O E7hDtHjceI7W8NKyA1JVBc2K3Rp1ukf/7UhaZIUo2g/4d45WymOZKqhu80O7VVfMjhoe Mm8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AsbIUkbVRLiUg4a24G2060lWij36hKA9Muc7hWTae/Q=; b=rxixYJKKCUOeZyMHOT4V6zI2KGWlHL8cY2c8zTC/UXrDoCRCYVWMe0MpIXSbttuRPh f/PFk8s0OR1j86CofTArgOPxHE+lYVbEUzutgbCWF2FYA/E81UyvkzP00U4z6jt1gLbg 1ZqiOjtM0f/CtEhzDsf8jtHMD3sG3mpPkuIwSnV2sfdvwehbPxvL5Q/7iHFyqt7qC0Xi fx4rAR8kwdGcSCJD5JuLDoDYeSmcQaztqBI6Jh4CBOydb279Pt525pyjTyGUBZE5q/Ub YfLxz6NqtxmrCsf+LbaQTK1rIhk5gNOK1oYMzRyZIpFF5aw+O+3RglYmip8AWAgvw0+G V2HA== X-Gm-Message-State: APt69E1D3E13UxL1HO/cTWaDevbXpwhZdeZi6E5HqoOseKghHB5dhbAJ aV4ZHd1OUtA32Wh0C+nN2yAA4NaEy1+v1U2rSZ8kLg== X-Google-Smtp-Source: AAOMgpfvMCLwjU2YiCX+kpNrOwvlKc+vQkl4MNAsIIYx/JonAMAOr6sc4+ghv1OKwICPkhhwbL+c17wc8RLAHvRueLU= X-Received: by 2002:a6b:1745:: with SMTP id 66-v6mr20058019iox.154.1530530114032; Mon, 02 Jul 2018 04:15:14 -0700 (PDT) MIME-Version: 1.0 References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2A0D2C@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2A0D2C@SHSMSX104.ccr.corp.intel.com> From: Michael Zimmermann Date: Mon, 2 Jul 2018 13:15:02 +0200 Message-ID: To: "Gao, Liming" Cc: edk2-devel-01 , Yonghong Zhu X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: Re: Questions about the build process X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jul 2018 11:15:15 -0000 Content-Type: text/plain; charset="UTF-8" Thanks for linking that issue. I'd really like to see that getting solved. As for ninja: Yes it usually reduces build time a lot because unlike make it uses a very simple and fast to parse language and handles threads completely by its own(you don't have to tell it how many jobs to use). Additionally it suppresses all build output and shows a nice progress bar. If a subtask fails it'll print just the log of the failed subtask. Thanks Michael On Mon, Jul 2, 2018, 11:11 AM Gao, Liming wrote: > Michael: > There is one bugzilia https://bugzilla.tianocore.org/show_bug.cgi?id=972 > on top level makefile generation. Its purpose is to let the make utility > figure out how to multi-thread the build and see whether there is the build > performance improvement. > > Edk2 BaseTools generates AutoGen and Makefile for every module, then > build module one by one. Every module has its own compiler flag, its > included path, its AutoGen.h and AutoGen.c. So, the module level makefile > is generated. > > I don't use ninja before. Edk2 build has supported multiple thread build > to trig Make in parallel. Does ninja improve build performance? > > Thanks > Liming > >-----Original Message----- > >From: Michael Zimmermann [mailto:sigmaepsilon92@gmail.com] > >Sent: Saturday, June 30, 2018 2:47 PM > >To: edk2-devel-01 ; Zhu, Yonghong > >; Gao, Liming > >Subject: [edk2] Questions about the build process > > > >Out of curiosity I took a closer look at how the build system works > >internall(especially the Makefile generation and parallel builds) and > >I got some questions which I hope you can answer: > > > >Why are we using make at all? > >As far as I can see we're not using any special make functionality and > >most dependency calculation is done in the python build tool anyway. > >So why don't we just run the build commands ourselves from within the > >build tool? > > > >Why is every module being build separately / Why don't we generate one > >makefile which does everything ? > >To give an opposite view on the previous question, why don't we > >generate makefiles which contain the whole internal dependency graph > >so the build tool can then call a top level 'make' and not worry about > >anything. We wouldn't even have to implement any kind of parallel > >build support(which we currently have a lot of code for) because make > >would do that for us. > > > >If scrambled log output during parallel builds is a concern, then we > >could switch to the "ninja" build system which would probably be way > >more suited for edk2's usecase because it's a pretty fast low level > >language which also gives you proper logs when building in parallel. > >ninja is available for linux, mac and windows. > > > >Thanks > >Michael >