File: StackCheckLibNullHostApplication.inf

package info (click to toggle)
edk2 2025.02-8
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 271,704 kB
  • sloc: ansic: 2,109,987; asm: 263,832; perl: 227,730; python: 149,919; sh: 34,967; cpp: 21,813; makefile: 3,282; xml: 806; pascal: 721; lisp: 35; ruby: 16; sed: 6; tcl: 4
file content (34 lines) | stat: -rw-r--r-- 1,529 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## @file
#  Null library instance for StackCheckLib which can be included
#  when a build needs to include stack check functions but does
#  not want to generate stack check failures. This instance is used
#  for HOST_APPLICATIONS specifically, as MSVC host applications link
#  to the C runtime lib that contains the stack cookie definitions, so
#  must link to a completely null version of this lib, whereas GCC host
#  host applications do not link to a C runtime lib that contains the stack
#  cookie definitions, so we must link against our version.
#
#  Copyright (c) Microsoft Corporation.
#  SPDX-License-Identifier: BSD-2-Clause-Patent
##

[Defines]
  INF_VERSION                    = 1.29
  BASE_NAME                      = StackCheckLibNullHostApplication
  FILE_GUID                      = 7EBE7BD1-0D92-4609-89AA-6EA3815CB844
  MODULE_TYPE                    = HOST_APPLICATION
  VERSION_STRING                 = 1.0
  LIBRARY_CLASS                  = StackCheckLib|HOST_APPLICATION

[Sources]
  StackCheckLibHostApplicationMsvc.c | MSFT
  StackCheckLibNullGcc.c             | GCC

[Packages]
  MdePkg/MdePkg.dec

[BuildOptions]
  # We cannot build the GCC version with LTO (link time optimization) because we run into linker errors where
  # the stack cookie variable has been optimized away, as it looks to GCC like the variable is not used, because
  # the compiler inserts the usage. We do not worry about the MSVC version here as it is a no-op.
  GCC:*_*_*_CC_FLAGS = -fno-lto