public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Steven Shi" <steven.shi@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
	"yuqi.chen@mail.utoronto.ca" <yuqi.chen@mail.utoronto.ca>
Subject: Re: [edk2-devel] [2021-gsoc-llvm-gnumake]: proposal for building using llvm/gnumake
Date: Fri, 13 Aug 2021 13:33:56 +0000	[thread overview]
Message-ID: <DM4PR11MB55492B918C97F0BD4D728CB18CFA9@DM4PR11MB5549.namprd11.prod.outlook.com> (raw)
In-Reply-To: <013001d78fe1$1a369fc0$4ea3df40$@byosoft.com.cn>


[-- Attachment #1.1: Type: text/plain, Size: 4555 bytes --]

Liming,
The MSVC is required only because the Windows SDK Universal C runtime (UCRT) library depends on the MSVC.  Please see the dependency description here: “When you install Visual C++, Visual Studio setup installs the subset of the Windows 10 SDK required to use the UCRT.” https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160.

If the MSVC is not installed, the ucrt will complain cannot find the msvc header files. Below is an example:
C:\Program Files\LLVM\bin\clang  -c  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ -I "" -MD -fshort-wchar -fno-strict-aliasing -fwrapv -fno-delete-null-pointer-checks -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -Wno-unused-result -nostdlib -Wno-unused-function -g -m32 -O2  BasePeCoff.c -o BasePeCoff.o
In file included from BasePeCoff.c:13:
In file included from ../Common\CommonLib.h:14:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\assert.h:12:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\corecrt.h:10:10: fatal error: 'vcruntime.h' file not
      found
#include <vcruntime.h>
         ^~~~~~~~~~~~~
1 error generated.



BTW, the compiler dependency requirement also exists in Linux side. Below is the Linux GCC CRT library example. Although I build with clang, it still needs link the crt libraries in GCC installation. Below is an example:
$ /home/jshi19/llvm/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/clang -o ../bin/LzmaCompress   LzmaCompress.o Sdk/C/Alloc.o Sdk/C/LzFind.o Sdk/C/LzmaDec.o Sdk/C/LzmaEnc.o Sdk/C/7zFile.o Sdk/C/7zStream.o Sdk/C/Bra86.o -L../libs -lCommon -###
clang version 11.0.0 (https://github.com/llvm/llvm-project.git 0160ad802e899c2922bc9b29564080c22eb0908c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jshi19/llvm/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin
"/usr/bin/ld" "-z" "relro" "--hash-style=gnu" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "../bin/LzmaCompress" "/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o" "/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crti.o" "/usr/lib/gcc/x86_64-linux-gnu/10/crtbegin.o" "-L../libs" "-L/usr/lib/gcc/x86_64-linux-gnu/10" "-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/../lib64" "-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu" "-L/lib/x86_64-linux-gnu" "-L/lib/../lib64" "-L/usr/lib/x86_64-linux-gnu" "-L/usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib" "-L/usr/lib/gcc/x86_64-linux-gnu/10/../../.." "-L/home/jshi19/llvm/clang+llvm-11.0.0-x86_64-linux-gnu-ubuntu-20.04/bin/../lib" "-L/lib" "-L/usr/lib" "LzmaCompress.o" "Sdk/C/Alloc.o" "Sdk/C/LzFind.o" "Sdk/C/LzmaDec.o" "Sdk/C/LzmaEnc.o" "Sdk/C/7zFile.o" "Sdk/C/7zStream.o" "Sdk/C/Bra86.o" "-lCommon" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/gcc/x86_64-linux-gnu/10/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crtn.o"




Thanks

Steven Shi
Intel\SATG\SFP\FIA (Firmware Infrastructure Automation)


From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming
Sent: Friday, August 13, 2021 9:18 AM
To: devel@edk2.groups.io; yuqi.chen@mail.utoronto.ca
Subject: 回复: [edk2-devel] [2021-gsoc-llvm-gnumake]: proposal for building using llvm/gnumake

Yuqi:
 On Windows, can Clang + make combination drop the dependency of Visual studio? If I don’t install Visual studio 2015 or 2017, I only install LLVM, can I fully compile BaseTools and Edk2 code?

Thanks
Liming
发件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 代表 Yuqi Chen
发送时间: 2021年8月12日 9:52
收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
主题: [edk2-devel] [2021-gsoc-llvm-gnumake]: proposal for building using llvm/gnumake

Hi,

I want to push my change to my codes to edk2-staging, yet it seems like I don’t have permission to do so:
[cid:image001.png@01D79030.EEE25800]

My mentor and I have enabled edk2 building using llvm+make and gnumake+clang in windows command prompt. The attached patch indicates changes we made to make this happen.

I also attach the readme file to go through the steps to build Basetools.

Please review our codes and thank you very much for your time.

Best regards,
Yuqi



[-- Attachment #1.2: Type: text/html, Size: 12674 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 76041 bytes --]

  reply	other threads:[~2021-08-13 13:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  1:51 [2021-gsoc-llvm-gnumake]: proposal for building using llvm/gnumake Yuqi Chen
2021-08-13  1:18 ` 回复: [edk2-devel] " gaoliming
2021-08-13 13:33   ` Steven Shi [this message]
2021-08-13 19:50     ` Pedro Falcato
2021-08-17 14:04       ` Steven Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM4PR11MB55492B918C97F0BD4D728CB18CFA9@DM4PR11MB5549.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox