summaryrefslogtreecommitdiff
path: root/BaseTools/Conf
AgeCommit message (Collapse)AuthorFilesLines
2022-06-10Revert "OvmfPkg/Sec: fix stack switch"Gerd Hoffmann1-3/+3
This reverts commit ff36b2550f94dc5fac838cf298ae5a23cfddf204. Has no effect because GCC_IA32_CC_FLAGS and GCC_X64_CC_FLAGS are unused. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-06-08OvmfPkg/Sec: fix stack switchGerd Hoffmann1-3/+3
The ebp/rbp register can either be used for the frame pointer or as general purpose register. With gcc (and clang) this depends on the -f(no-)omit-frame-pointer switch. This patch updates tools_def.template to explicitly set the compiler option and also add a define to allow conditionally compile code. The new define is used to fix stack switching in TemporaryRamMigration. The ebp/rbp must not be touched when the compiler can use it as general purpose register. With version 12 gcc starts actually using the register, so changing it leads to firmware crashes in some configurations. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3934 Reported-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2022-05-13BaseTools: Remove RVCT supportedk2-stable202205-rc1Rebecca Cran2-190/+9
RVCT is obsolete and no longer used. Remove support for it. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-04-28BaseTools/Conf: Fix Dynamic-Library-File templateJake Garver via groups.io1-0/+2
In the Dynamic-Library-File template, add missing output file declarations. These files are generated by the template and other rules explicitly depend on them. This change resolves missing dependency issues we encountered while running a recursive make with job control. Signed-off-by: Jake Garver <jake@nvidia.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2022-03-01BaseTools: Upgrade the version of NASM toolJason1-3/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3790 Upgrade the version of NASM tool to avoid compilation errors when compiling NASM code change. Signed-off-by: Jason Lou <yun.lou@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
2022-02-10BaseTools: Update CLANG{35,38}_WARNING_OVERRIDES to ignore unused varsedk2-stable202202-rc1Rebecca Cran1-2/+2
Building with the CLANG35 and CLANG38 toolset fails because of variables which are set but not otherwise used in the RELEASE build. GCC added -Wno-unused-but-set-variable back in 2016, and later added -Wno-unused-const-variable. Add those to CLANG35_WARNING_OVERRIDES and CLANG38_WARNING_OVERRIDES. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2022-02-07BaseTools/Conf: Add new macro for customizing dll file reduction.Wei6 Xu2-1/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3810 New macro OBJCOPY_STRIPFLAG is added in build_rule.template to replace '--strip-unneeded -R .eh_frame', so that module can have some unique objcopy flags for its own purpose. In tools_def.template, set '--strip-unneeded -R .eh_frame' as default value of OBJCOPY_STRIPFLAG. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Wei6 Xu <wei6.xu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-06-04BaseTools: Change CLANG8ELF to CLANGDWARFNi, Ray1-90/+91
CLANGDWARF is more proper because it's similar to CLANGPDB that generates PE images but with DWARF debug symbols. This toolchain is needed for creating ELF format universal payload that follows https://universalpayload.github.io/documentation/. Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-06-04BaseTools: Add new CLANG8ELF tool chain for new LLVM/CLANG8Liming Gao1-0/+102
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1603 LLVM/CLANG8 formal release http://releases.llvm.org/download.html#8.0.0 It can be downloaded and installed in Windows/Linux/Mac OS. CLANG8ELF tool chain is added to generate ELF image, and convert to PE/COFF. On Windows OS, set CLANG_HOST_BIN=n, set CLANG8_BIN=LLVM installed directory For example: set CLANG_HOST_BIN=n # use windows nmake set CLANG8_BIN=C:\Program Files\LLVM\bin\ On Linux/Mac, set CLANG8_BIN=LLVM installed directory This tool chain can be used to compile the firmware code. On windows OS, Visual Studio is still required to compile BaseTools C tools and nmake.exe. On Linux/Mac OS, gcc is used to compile BaseTools C tools. make is used for makefile. This tool chain is verified on OVMF Ia32, X64 and Ia32X64 to boot Shell. This tool chain is verified in Windows/Linux and Mac OS. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
2021-06-04BaseTools: Update build_rule to skip CLANG resource section generationLiming Gao1-3/+2
LLVM/CLANG doesn't support resource section generation when ELF image generated. Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Feng Bob C <bob.c.feng@intel.com>
2021-05-17BaseTools: Add DTCPP_FLAGS for GCC5 RISCV64 toolchainDaniel Schaefer1-0/+1
Some/all platforms are going to require EDK2 to build a device tree and use it in the early stages of boot. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Daniel Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2021-04-19BaseTools/Conf/tools_def.template: Remove redundant MAKE statementsMichael D Kinney1-55/+0
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3337 Remove redundant MAKE_PATH and MAKE_FLAGS statements for VS20xx tool chains. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
2021-04-12BaseTools/Conf: Fix MAKE_FLAGS typos in tools_def.templateMichael D Kinney1-8/+8
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3313 Change MAKE_FLAG to MAKE_FLAGS to match required name from EDK II Build Specifications for VS20xx tool chains. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com>
2020-10-10BaseTools Build_Rule: Add the missing ASM16_FLAGS for ASM16 source filegaoliming1-1/+1
Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-07-24Revert "BaseTools: Add gcc flag to warn on void* pointer arithmetic"Bob Feng1-3/+3
This reverts commit dbd546a32d5abe225306e22d43a7d86e3a042eee. This patch also breaks about half of the ARM/AARCH64 platforms in edk2-platforms Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Pierre Gondois <pierre.gondois@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-07-21BaseTools: Factorize GCC flagsPierre Gondois1-1/+1
GCC48_ALL_CC_FLAGS has no dependency on GCC_ALL_CC_FLAGS. By definition, there should be such dependency. The outcomes of this patch is that GCC48_ALL_CC_FLAGS and other dependent configurations will inherit from the additional "-Os" flag. The "-Os" flag optimizes a build in size, not breaking any build. In a gcc command line, the last optimization flag has precedence. This means that this "-Os" flag will be overriden by a more specific optimization configuration, provided that this more specific flag is appended at the end of the CC_FLAGS. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com> Reviewed-by: Bob Feng<bob.c.feng@intel.com>
2020-07-21BaseTools: Add gcc flag to warn on void* pointer arithmeticPierre Gondois1-3/+3
By default, gcc allows void* pointer arithmetic. This is a GCC extension. However: - the C reference manual states that void* pointer "cannot be operands of addition or subtraction operators". Cf s5.3.1 "Generic Pointers"; - Visual studio compiler treat such operation as an error. To prevent such pointer arithmetic, the "-Wpointer-arith" flag should be set for all GCC versions. The "-Wpointer-arith" allows to: "Warn about anything that depends on the "size of" a function type or of void. GNU C assigns these types a size of 1, for convenience in calculations with void * pointers and pointers to functions." This flag is available since GCC2.95.3 which came out in 2001. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Bob Feng<bob.c.feng@intel.com>
2020-07-03BaseTools: convert diff.order to LF-onlyLeif Lindholm1-13/+13
SetupGit.py sets the git config option diff.orderFile to {edk2 directory}/BaseTools/Conf/diff.order, to override the default order in which files are shown in a diff/patch/whatever. This is in imitation of what is done manually in Laszlo's Unkempt Guide. However, the version currently in the tree is in CRLF format, which makes git interpret e.g. *.c as matching on *.c<CR>, finding no matches and failing to apply the desired reordering. Note: this is true regardless of whether running on Linux or Windows. Convert the file to LF-only to make it work as expected. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-07-02BaseTools: Compile AML bytecode arrays into .obj filePierre Gondois1-2/+13
The AmlToHex script and Posix/WindowsLike wrappers convert an AML file to a .hex file, containing a C array storing AML bytecode. This ".hex" file can then be included in a C file, allowing to access the AML bytecode from this C file. The EDK2 build system doesn't allow to a depict dependency orders between files of different languages. For instance, in a module containing a ".c" file and a ".asl", the ".c" file may or may not be built prior to the ".asl" file. This prevents any inclusion of a generated ".hex" in a ".c" file since this later ".hex" file may or may not have been created yet. This patch modifies the AmlToC script to generate a C file instead of a ".hex" file. It also adds the generation of an intermediate ".amli" file when compiling an ASL file, and adds a rule to convert this ".amli" to a C file. This allows to generate a C file containing the AML bytecode from an ASL file. This C file will then be handled by the EDK2 build system to generate an object file. Thus, no file inclusion will be required anymore. The C file requiring the AML bytecode as a C array, and the ASL file, will be compiled independently. The C array must be defined as an external symbol. The linker is resolving the reference to the C array symbol. To summarize, the flow goes as: -1. ASL file is compiled to AML; -2. AML file is copied to a ".amli" intermediate file; -3. EDK2 build system applies the rule relevant to ".amli" files. This is, calling the "AmlToC" script, generating a C file from the ".amli" file; -4. EDK2 build system applies the rule relevant to C files. This is creating an object file. -5. EDK2 build system links the object file containing the AML bytecode with the object file requiring it. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Suggested-by: Tomas Pilar <Tomas.Pilar@arm.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-06-24BaseTools: Add external definitions for RISC-V assembly buildAbner Chang1-0/+1
Add opensbi external definitions to RISC-V build for assembly code. Use GCC5_RISCV_OPENSBI_TYPES to refer to edk2 data type for assembly files instead of using opensbi data type. Signed-off-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Daniel Schaefer <daniel.schaefer@hpe.com> Cc: Leif Lindholm <leif.lindholm@linaro.org>
2020-05-21BaseTools: Remove deprecated Visual Studio OptionSami Mujawar1-9/+9
The VS2017 compiler reports 'warning D9035 : option 'Gm' has been deprecated and will be removed in a future release' The documentation for the 'Gm' option at https://docs.microsoft.com/en-us/cpp/build/reference/gm-enable-minimal-rebuild?view=vs-2019 indicates that this option can be safely removed from the project. Therefore, remove the deprecated 'Gm' Visual Studio Compiler option. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2660 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-04-29BaseTools: BaseTools changes for RISC-V platform.Abner Chang1-2/+51
Tools definitions template file changes for building EDK2 RISC-V platform. Signed-off-by: Abner Chang <abner.chang@hpe.com> Co-authored-by: Gilbert Chen <gilbert.chen@hpe.com> Co-authored-by: Daniel Helmut Schaefer <daniel.schaefer@hpe.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Gilbert Chen <gilbert.chen@hpe.com>
2020-04-08BaseTools: Use SEH exceptions in CLANGPDB for IA32Vitaly Cheptsov1-7/+7
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2628 This patch reduces the size of IA32 binaries by ensuring that no .debug_frame / .eh_frame sections are generated through forcing SEH exception model, which is already the default in clang for X64. EDK II does not support exceptions, and in future we should disable them instead of switching to some other variant. Currently this is not possible due to the following LLVM bugs: https://bugs.llvm.org/show_bug.cgi?id=45324 https://bugs.llvm.org/show_bug.cgi?id=45325 Upon applying this patch OvmfPkgIA32.dsc compilation in DEBUG mode gets the following size decrease with clang 9.0.1. Before: FV Space Information SECFV [11%Full] 212992 total, 24512 used, 188480 free PEIFV [22%Full] 917504 total, 203048 used, 714456 free DXEFV [36%Full] 11534336 total, 4215672 used, 7318664 free FVMAIN_COMPACT [37%Full] 3440640 total, 1287776 used, 2152864 free After: FV Space Information SECFV [10%Full] 212992 total, 22112 used, 190880 free PEIFV [19%Full] 917504 total, 176392 used, 741112 free DXEFV [31%Full] 11534336 total, 3657112 used, 7877224 free FVMAIN_COMPACT [33%Full] 3440640 total, 1153896 used, 2286744 free Cc: Liming Gao <liming.gao@intel.com> Cc: Marvin H?user <mhaeuser@outlook.de> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
2020-02-13BaseTools: remove -DNO_MSABI_VA_FUNCS option in CLANGPDB tool chainLiu, Zhiguang1-1/+1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2524 remove -DNO_MSABI_VA_FUNCS option in CLANGPDB tool chain After CLANGPDB is switched to GNU mode, to use MS ABI version of GCC built-in macros for variable argument lists as same as CLANG38 tool chain. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-02-11BaseTools: Switch to GNU mode for CLANGPDBVitaly Cheptsov1-3/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2397 Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-02-07BaseTools: Enhance call stack unwindability for CLANGPDB x64 binarySteven1-7/+9
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2487 The call stack unwindability of the COFF X64 binary requires the binary to remain the pdata and xdata sections. Details see the MSVC X64 calling convertion doc in below link: https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention Current build options discard or zero the data in pdata and xdata sections which cause the debugger cannot correctly unwind the X64 binary call stack in the runtime. Enhance the build options to force emit the unwind tables and keep the data of pdata and xdata sections correct in the binary. Signed-off-by: Steven Shi <steven.shi@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-02-07BaseTools tools_def.template: Add back -fno-pie option in GCC49 tool chainLiming Gao1-2/+2
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2502 This option is required to make GCC49 tool chain work with the high version GCC compiler. Cc: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-02-06BaseTools: Script for converting .aml to .hexPierre Gondois1-0/+3
The "-tc" option of the iasl compiler allows to generate a .hex file containing a C array storing AML bytecode. An online discussion suggested that this "-tc" option was specific to the iasl compiler and it shouldn't be relied on. This conversation is available at: https://edk2.groups.io/g/devel/topic/39786201#49659 A way to address this issue is to implement a compiler independent script that takes an AML file as input, and generates a .hex file. This patch implements a Python script that converts an AML file to a .hex file, containing a C array storing AML bytecode. This scipt has been tested with the AML output from the following compilers supported by the EDKII implementation: * Intel ASL compiler * Microsoft ASL compiler Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2020-02-06BaseTools: append -DNO_MSABI_VA_FUNCS option in CLANGPDB tool chainLiu, Zhiguang1-1/+1
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2415 Define NO_MSABI_VA_FUNCS to use GCC built-in macros for variable argument lists for CLANGPDB tool chain. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2020-01-31BaseTools/Conf/gitattributes: fix "--function-context" for C source codeLaszlo Ersek1-0/+11
The "--function-context" ("-W") option of git-diff displays the entire body of a modified function, not just small modified hunks within the function. It is useful for reviewers when the code changes to the function are small, but they could affect, or depend on, control flow that is far away in the same function. Of course, the size of the displayed context can be controlled with the "-U" option anyway, but such fixed-size contexts are usually either too small, or too large, in the above scenario. It turns out that "--function-context" does not work correctly for C source files in edk2. In particular, labels for the goto instruction (which the edk2 coding style places in the leftmost column) appear to terminate "--function-context". The "git" utility contains built-in hunk header patterns for the C and C++ languages. However, they do not take effect in edk2 because we don't explicitly assign the "cpp" git-diff driver to our C files. The gitattributes(5) manual explains that this is required: > There are a few built-in patterns to make this easier, and > tex is one of them, so you do not have to write the above in > your configuration file (you still need to enable this with > the attribute mechanism, via .gitattributes). The following > built in patterns are available: > > [...] > > * cpp suitable for source code in the C and C++ > languages. The key statement is the one in parentheses. Grab the suffix lists from the [C-Code-File] and [Acpi-Table-Code-File] sections of "BaseTools/Conf/build_rule.template", add "*.h" and "*.H", and mark those as belonging to the "cpp" git-diff driver. This change has a dramatic effect on the following command, for example: $ git show -W 2ef0c27cb84c Cc: Bob Feng <bob.c.feng@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200120094245.9010-1-lersek@redhat.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-12-18BaseTools:replaces the two offending quotes by ascii quotesFan, Zhiju1-2/+2
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2423 That commit 13c5e34a1b introduces the first two UTF-8 characters (the quote ') in an otherwise all-ascii file. In Conf\tools_def.template There is tow lines of Notes: Since this tool chain is obsolete, it doesn't enable the compiler option for included header file list generation, we replaces the two offending quotes by proper ascii quotes The patch is going to fix this issue Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-12-10BaseTools: Update build_rule.txt to generate dependent files.Bob Feng1-42/+54
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2311 Enable the dependent files generation function for compilers and Trim tool. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-12-10BaseTools: Add build option for dependency file generationBob Feng1-83/+98
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2311 Add /showIncludes for msvc and -MMD -MF $@.deps for GCC and CLANG Remove /MP for msvc since /MP does not work with /showIncludes Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-11-15BaseTools: Rename tool chain CLANG9 to CLANGPDBLiming Gao2-85/+85
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2341 Based on feedback from https://edk2.groups.io/g/devel/message/50466, CLANGPDB is the most acceptable tool chain name, because this tool chain generates PE/COFF image with PDB debug symbol. The following changes are made in this patch. 1. Update tool chain name from CLANG9 to CLANGPDB. 2. Update tool chain BUILDRULEFAMILY from CLANGPE to CLANGPDB. 3. Update CLANG9_BIN env name to CLANG_BIN without version info. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-11-11BaseTools: Add RC_PATH define for VS2017/2019Sean Brogan1-2/+16
https://bugzilla.tianocore.org/show_bug.cgi?id=2315 Add use of RC_PATH define that provides the path to the resource compiler that is typically provided in a Windows SDK. The path changes with different Windows SDK releases. This define is set to the WINSDK_PATH_FOR_RC_EXE environment variable. This environment variable must be set to the path to the currently installed resource compiler (rc.exe). Update set_vsprefix_envs.bat to set WINSDK_PATH_FOR_RC_EXE if a Windows SDK is detected. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-10-24BaseTools tools_def: Add CLANG9 tool chain to directly generate PE imageLiming Gao2-10/+118
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com>
2019-10-24BaseTools tools_def.template: Remove unnecessary $(DEST_DIR_DEBUG) pathLiming Gao1-11/+11
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1603 $(DEST_DIR_DEBUG) path is in Include directory. It is not required to be specified again. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-10-04BaseTools: fix line endings in SetupGit.py Conf filesLeif Lindholm2-2/+2
A file header license/copyright header copied around in commit 5b3e695d8ac5 ("BaseTools: add centralized location for git config files") was missing a CR - add it in both faulty locations. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
2019-09-23Add VS2019 Toolchain defCheng, Ching JenX1-19/+201
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2182 In order to support VS2019, the first thing need to do is add 2019 toolchain on tools_def.template v2: add ARM/AARCH64/EBC Definitions, Combine VS2017_HOST and VS2019_HOST to VS_HOST Cc: Amy Chan <amy.chan@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Ching JenX Cheng <ching.jenx.cheng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Pete Batard <pete@akeo.ie>
2019-08-19BaseTools/tools_def.template: Add -gdwarf to XCODE5 X64Andrew Fish1-2/+2
Add -gdwarf to XCODE5 X64 builds to generate symbols for source level debug using lldb. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Andrew Fish <afish@apple.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Andrew Fish <afish@apple.com>
2019-07-12BaseTools: Add HOST_APPLICATION module type.Jiewen Yao1-1/+1
It can be used to indicate a module can be build to run as OS application and run in OS environment. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-07-08BaseTools: Fix various typosAntoine Cœur1-4/+4
Fix various typos in BaseTools. Signed-off-by: Cœur <coeur@gmx.fr> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-06-12BaseTools: add centralized location for git config filesLeif Lindholm2-0/+32
Before adding the git environment initialization script, add the following files that will be pointed to after running said script: - BaseTools/Conf/diff.order - BaseTools/Conf/gitattributes Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-05-23BaseTools: Update Conf/target.template with the default EmulatorPkg.dscLiming Gao1-2/+2
Nt32Pkg has been removed. The default platform is changed to EmulatorPkg.dsc. Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-05-09BaseTools:Delete FrameworkDatabase from BaseTools/ConfFan, ZhijuX1-23/+0
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1627 The FrameworkDatabase was already obsolete, So, FrameworkDatabase can be removed from BaseTools/Conf. This patch is going to fix this issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-04-28BaseTools/tools_def.template: Remove tools chain with ASL toolShenglei Zhang1-1260/+0
Microsoft ASL is not verified now. So remove tool chain with ASL tool. They are: VS2008xASL, VS2008x86xASL, VS2010xASL, VS2010x86xASL, VS2012xASL, VS2012x86xASL, VS2013xASL, VS2013x86xASL, VS2015xASL, VS2015x86xASL and CYGGCCxASL. https://bugzilla.tianocore.org/show_bug.cgi?id=1667 v2:Remove definitions of WIN_ASL_BIN, MS_ASL_OUTFLAGS and MS_ASL_FLAGS. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-04-24BaseTools: Remove ICC tool chain in tools_def.templateShenglei Zhang1-1092/+0
There is no Intel compiler test. Suggest to remove ICC tool chain from tools_def.template. https://bugzilla.tianocore.org/show_bug.cgi?id=1666 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 323b5b06c593ba6e438847dec7d4acec7f9df970)
2019-04-16BaseTools:Enable the /MP option of MSVC compilerFan, ZhijuX1-63/+63
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1672 The /MP option of MSVC compiler can reduce the total time to compile the source files on the command line. This patch is going to enable this MSVC option in BaseTools. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2019-04-10BaseTools: Fixed issue in MultiThread Genfds functionFeng, Bob C1-4/+4
https://bugzilla.tianocore.org/show_bug.cgi?id=1450 In the Multiple thread Genfds feature, build tool generates GenSec, GenFFS command in Makefile. The Non-Hii Driver does not generate .offset file for uni string offset, but the build tool has not knowledge about this in autogen phase. So in this patch, I add a check in Makefile for GenSec command. If the GenSec input file does not exist, the GenSec will not be called. And if GenSec command is not called, its output file, which is also the input file of GenFfs command, will also not exist.So for GenFfs command, I add a new command parameter -oi which means the input file is an optional input file which would not exist. so that I can generate GenFfs command with "-oi" parameter in Makefile. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-04-09BaseTools: Replace BSD License with BSD+Patent LicenseMichael D Kinney6-40/+6
https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>