<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/BaseTools/Source/C, branch dependabot/github_actions/actions/github-script-9</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-04-23T05:31:47+00:00</updated>
<entry>
<title>BaseTools: Add missing machine types while dumping Option Rom</title>
<updated>2026-04-23T05:31:47+00:00</updated>
<author>
<name>Qihang Gao</name>
<email>gaoqihang@loongson.cn</email>
</author>
<published>2026-04-20T06:24:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5e2bea1a7453dddeaa83840a4b974bb94d3e4f9c'/>
<id>urn:sha1:5e2bea1a7453dddeaa83840a4b974bb94d3e4f9c</id>
<content type='text'>
When dumping LOONGARCH64 or RISCV64 Option Rom by `EfiRom -d test.rom`
command, the machine type is showed as `unknown`. This patch adds type
lookup strings for the two architectures.

Signed-off-by: Qihang Gao &lt;gaoqihang@loongson.cn&gt;
</content>
</entry>
<entry>
<title>BaseTools: Enable control flow guard for Windows builds</title>
<updated>2026-03-26T02:28:23+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-03-17T18:37:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ef23e3c9e726edd714b2091657e8fad1a35eb325'/>
<id>urn:sha1:ef23e3c9e726edd714b2091657e8fad1a35eb325</id>
<content type='text'>
Certain environments require Control Flow Guard (CFG) to be enabled at
build time as part of their security hardening requirements.

This change adds the necessary compiler and linker flags to enable CFG
support.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Suppress C4028 warning to support older VS toolchain builds</title>
<updated>2026-03-26T02:28:23+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-03-16T21:48:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4e0376c48b1738da5539801458bfa70ad43bc53e'/>
<id>urn:sha1:4e0376c48b1738da5539801458bfa70ad43bc53e</id>
<content type='text'>
Add conditional suppression of MSVC warning C4028 (formal parameter
different from declaration) when building with Visual Studio 2017 or
earlier toolchain.

This warning is triggered by brotli submodule and not emitted by newer
compilers, hence a conditional supression is used.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: GenFfs/GenFv/GenSec: Fixing Warning 4319 from MSVC</title>
<updated>2026-03-13T19:14:49+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2026-03-10T08:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8c298e11045e95d9ef40dedc3e6a37eb2625487a'/>
<id>urn:sha1:8c298e11045e95d9ef40dedc3e6a37eb2625487a</id>
<content type='text'>
This change fixes a warning newly emitted by the latest MSVC, which now
treats this warning as an error and causes the build to fail.

This change aligns operand types in bitwise expressions by casting sizeof
results to UINT32, and promoting a UINT32 to UINTN where required to
correctly apply the bitmask.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Source/C/Include/Common: Add back include guard</title>
<updated>2026-02-27T07:15:11+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-02-25T20:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3eb2ff24b9fe5c0ea8d543e1deb7c6efac610655'/>
<id>urn:sha1:3eb2ff24b9fe5c0ea8d543e1deb7c6efac610655</id>
<content type='text'>
Add include guards back to include files that use the same
include guard macro in BaseTools/Source/C/Include/Common
and MdePkg or MdeModulePkg.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/Source/C/VfrCompile: Fix parallel make failures</title>
<updated>2026-02-27T04:54:43+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-02-25T05:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9fc0aca51e83afda703963ea177feeb78a125cbc'/>
<id>urn:sha1:9fc0aca51e83afda703963ea177feeb78a125cbc</id>
<content type='text'>
Update makefile rules to run antlr and dlg to completion
before compiling any of the generated cpp files.

Without this change, parallel make may start compiling some
of the cpp files before both antlr and dlg have finished
which produces syntax errors from compilation with partially
generated files.

Also use &amp;: so the targets are treated as a group and the
rule is only executed once for the entire group. Without
this change, parallel make may run the rule actions more
than once and modify the output while it is being used by
another rule.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>BaseTools: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T17:42:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0e6d10de1c9aa3dd8c38979afc0249ad3da97e31'/>
<id>urn:sha1:0e6d10de1c9aa3dd8c38979afc0249ad3da97e31</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Note: Some files in BaseTools are excluded from the change if they
are autogenerated or direcly related to a header from a subproject,
etc. In particular, headers in these directories were ignored:

- BaseTools/Source/C/LzmaCompress/Sdk/
- BaseTools/Source/C/VfrCompile/Pccts/

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>BaseTools/VfrCompile: Add #pragma once support</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T13:11:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=3f81a4902a985f09050289669233fca3ffa44572'/>
<id>urn:sha1:3f81a4902a985f09050289669233fca3ffa44572</id>
<content type='text'>
The C preprocessor turns each .vfr file into a pre-processed .i
file. At this step, the C preprocessor processes `#pragma once`.
Then, VfrCompile is called (with `-n` to prevent preprocessing)
to parse the pre-processed .i files.

The .i files may still contain `#pragma once` lines. Currently,
VfrCompile treats `once` as an unknown token, causing parse failures.

Originally, this change was going to add a `PragmaOnce` token rule
to the VFR lexer grammar (in VfrSyntax.g) that matched `#pragma once`
lines and silently skipped them using `skip()` and `newline()`. The
`newline()` call would keep line numbers stable for error reporting.
This was consistent with how other preprocessor artifacts were already
handled like `#line` directives (`LineDefinition` and
`GccLineDefinition` tokens) and `extern` declarations (skipped with
`mode(CPP_COMMENT)`).

Writing a regular expression to match `#pragma once` was simple
enough, but it makes overall pragma token recognition more fragile
at the lexer level. When the lexer is walking the DFA state table,
it could begin to match a `#pragma ` line but then not be able to
match remaining characters to recognize tokens other than `once`.

Instead, this change handles `#pragma once` lines in the VFR parser
grammar in `vfrPragmaDefinition` alongside where `pack` is already
handled.

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Revert "BaseTools: Add support for out-of-tree builds"</title>
<updated>2026-02-11T22:53:29+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-02-11T18:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=12f785f106216eedbedb02427255e257d506367f'/>
<id>urn:sha1:12f785f106216eedbedb02427255e257d506367f</id>
<content type='text'>
This reverts commit 3fe1d56cc98e011bbde8348f13dfa5e38c95f49e.

PR https://github.com/tianocore/edk2/pull/11757 introduced a
"Breaking Change" feature for out of tree builds of tools.

This breaking change is blocking testing of edk2-stable202602
due to side effects on building FitGen tool in edk2-platforms.

Revert this feature for the edk2-stable202602 release and
work on this feature after the release.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>Revert "BaseTools/Source/C/Makefile: Update OBJECTS using OS specific SEP"</title>
<updated>2026-02-11T22:53:29+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-02-11T17:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e1c56cf5d54f469dece5c2678c1ea6841b4fe4fa'/>
<id>urn:sha1:e1c56cf5d54f469dece5c2678c1ea6841b4fe4fa</id>
<content type='text'>
This reverts commit f0542ae07d5e5e4d311bf8ae33bf26b4b1acf9f4.

PR https://github.com/tianocore/edk2/pull/11757 introduced a
"Breaking Change" feature for out of tree builds of tools.

This breaking change is blocking testing of edk2-stable202602
due to side effects on building FitGen tool in edk2-platforms.

Revert this feature for the edk2-stable202602 release and
work on this feature after the release.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
</feed>
