From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in2.apple.com (mail-out2.apple.com [17.151.62.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E0B420D77DAA for ; Thu, 6 Apr 2017 11:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1491505032; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UOzvAmryUQydTo7w/NfltmsvF3oy2CMUEfxLe/mYWgs=; b=uasNvKUU2G0rNYLkVYoIM6yE4JaUL4rCTkDEgAObIpMBrudbjSL5Eye9xOWoLKXb BvE0jCErILYPpsXTSN8OX25kXJWLFtkZ+DXXDpUroZajczlc8nbwMSjnHZNNFh2s J1+FC3ndNylVGvr0x0yqT7/WPrPwgjS7MspwMdAkJkYlgENwbG1dUJDoFy4s1Ocn bXIk4A5PbH1MoVZo7+Ps5X7Sp+S52iiJB0xN7aTCz+hy8paTcVsT1uiJ1a8S2nTi wAzutbA74mO3hLxwJm+R0BxLydrJ3qZGLPAzvXPvF0dYflu9IsN9q6E01GDSmTPy rPLt/VPtbDjdcmcRLmFQBA==; Received: from relay3.apple.com (relay3.apple.com [17.128.113.83]) by mail-in2.apple.com (Apple Secure Mail Relay) with SMTP id 65.07.29388.78F86E85; Thu, 6 Apr 2017 11:57:12 -0700 (PDT) X-AuditID: 11973e11-2f7fb700000072cc-b7-58e68f87aa12 Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by relay3.apple.com (Apple SCV relay) with SMTP id A3.49.03951.78F86E85; Thu, 6 Apr 2017 11:57:11 -0700 (PDT) MIME-version: 1.0 Received: from da0601a-dhcp91.apple.com (da0601a-dhcp91.apple.com [17.226.15.91]) by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OO000APX4NB40B0@nwk-mmpp-sz13.apple.com>; Thu, 06 Apr 2017 11:57:11 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish Message-id: Date: Thu, 06 Apr 2017 11:57:10 -0700 In-reply-to: Cc: edk2-devel@lists.01.org To: Peter Hornyack References: X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsUi2FAYrNvR/yzCYOJrEYs9h44yW5x6/ILZ gcljwaZSj+7Z/1gCmKK4bFJSczLLUov07RK4Mi7dFCs4rV+xe9E05gbGCZpdjJwcEgImEmeW LWbtYuTiEBLYyyhx9vFOZphE08f1UIlDjBK/u9YzgSR4BQQlfky+x9LFyMHBLBAm8fSQIUTN KiaJb8u+s4PUCAuIS7w7swlsEJuAssSK+R/YIXptJKbtamSDqHGQeLXsGFicRUBVYlXDBTCb UyBYounkDLAaZgFpiYcTj7OC2CICuhJ9N/6BzRQSCJD4snkV1KGyErdmX2IGOUJCoJldou3S CbYJjEKzkNw6C+HWWWBjtSS+P2qFCstLHDwvCxHWlHh27xM7hK0t8eTdBdYFjGyrGIVyEzNz dDPzjPQSCwpyUvWS83M3MYKiYLqd4A7G46usDjEKcDAq8fB6PH4SIcSaWFZcmXuIUZqDRUmc Vzf7aYSQQHpiSWp2ampBalF8UWlOavEhRiYOTqkGxrSbkW/tNKJP154v00p0XLtDgklqCYv+ mpeTM9RjHjKed59dL3rkmH03i2ruSj0bm+Vz5T55yr8v9/16a7rvWod9KZX6k+z+TUjf9PF0 f98zadvrbw+qLHa8vnwxrw6njYJJzol57vcbPSNm3+HU4ZjcM/FqHuv/ZsN8j879U0wuM1t+ 6Fu6X4mlOCPRUIu5qDgRAMgJoH9jAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJKsWRmVeSWpSXmKPExsUi2FB8Q7e9/1mEwZXFihZ7Dh1ltjj1+AWz A5PHgk2lHt2z/7EEMEVZ26TlF5UnFqUoFCUXlNgqFWckpuSXx1saG5k6JBYU5KTqJefnKunb 2aSk5mSWpRYhsxKsMy7dFCs4rV+xe9E05gbGCZpdjJwcEgImEk0f17N2MXJxCAkcYpT43bWe CSTBKyAo8WPyPZYuRg4OZoEwiaeHDCFqVjFJfFv2nR2kRlhAXOLdmU3MIDabgLLEivkf2CF6 bSSm7Wpkg6hxkHi17BhYnEVAVWJVwwUwm1MgWKLp5AywGmYBaYmHE4+zgtgiAroSfTf+gc0U EgiQ+LJ5FTPEobISt2ZfYp7AyD8LyXmzEM6bBTZJS+L7o1aosLzEwfOyEGFNiWf3PrFD2NoS T95dYF3AyLaKUaAoNSex0lgPHnibGMFxURi8g/HPMqtDjAIcjEo8vB6Pn0QIsSaWFVfmAoOI g1lJhPdf67MIId6UxMqq1KL8+KLSnNTiQ4z7GYF+nMgsJZqcD4zavJJ4Q2MLY0sTCwMDE0sz E8LCJiYGJsbGZsbG5ibmtBRWEufddO9xhJBAemJJanZqakFqEcwLTBycUg2MXptmmRq4mDT9 nvuDq7CY/Urunboiph3nfDYlxN6eudL17rRLU75eTvyREsAUwclXddTeMtr0vvss/b8HZ+Wt E1558FOffU51sP+U/Z+0hJmMfCX5Sh5cEst9sfngKae/j9sC56iuEfwrxpPu9lH6Kd9Xyd/z dtpf4nFjON+wb9oLQZ86qQtblViASdtQi7moOBEAA8Y2BywDAAA= X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: Pull in pre-built library during edk2 build? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 18:57:12 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Apr 6, 2017, at 11:07 AM, Peter Hornyack wrote: > > I'd like to make an adjustment to the edk2 build (locally, not for > upstream) and I'm hoping someone can offer some guidance. > > My goal is to pre-build an edk2 library in a separate build process, > then pull that library into the full build later on. Specifically I'm > building my firmware image using OvmfPkgX64.dsc, but I want to build > OpensslLib (CryptoPkg/Library/OpensslLib/OpensslLib.inf) in advance, > then pull the resulting lib into the full build later. How can I > achieve this? > > In my build output I can see that when OpensslLib.inf is built, all of > the openssl .c files are compiled into .obj files, then an ar command > wraps those up into OpensslLib.lib. I want to pull those steps out and > pre-build OpensslLib.lib, but I've been unable to find where/how the > edk2 build grabs that .lib file and turns it into the final firmware > image. I've reviewed the edk2 build documentation but still can't > figure this out. Can anyone point me to the right place in the edk2 > build files where I can make this happen? Or perhaps is there an > example of this already in the edk2 build that I can imitate? > Peter, https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/build_rule.template gets copied to Cont/build_rule.txt and these are the rules use to build the makefiles. In your INF file you can add a [BuildOptions] section and use that to modify the compiler, linker flags, etc for your module. This is the horrific example of what is possible: https://github.com/tianocore/edk2/blob/master/EmulatorPkg/Unix/Host/Host.inf#L118 You can prune by compiler type, architecture, and which FLAG you want to use. I seem to remember = is append and == is replace. Thanks, Andrew Fish > Thanks, > Peter > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel