1 | ## @file
|
---|
2 | # Null library instance for StackCheckLib which can be included
|
---|
3 | # when a build needs to include stack check functions but does
|
---|
4 | # not want to generate stack check failures. This instance is used
|
---|
5 | # for HOST_APPLICATIONS specifically, as MSVC host applications link
|
---|
6 | # to the C runtime lib that contains the stack cookie definitions, so
|
---|
7 | # must link to a completely null version of this lib, whereas GCC host
|
---|
8 | # host applications do not link to a C runtime lib that contains the stack
|
---|
9 | # cookie definitions, so we must link against our version.
|
---|
10 | #
|
---|
11 | # Copyright (c) Microsoft Corporation.
|
---|
12 | # SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
13 | ##
|
---|
14 |
|
---|
15 | [Defines]
|
---|
16 | INF_VERSION = 1.29
|
---|
17 | BASE_NAME = StackCheckLibNullHostApplication
|
---|
18 | FILE_GUID = 7EBE7BD1-0D92-4609-89AA-6EA3815CB844
|
---|
19 | MODULE_TYPE = HOST_APPLICATION
|
---|
20 | VERSION_STRING = 1.0
|
---|
21 | LIBRARY_CLASS = StackCheckLib|HOST_APPLICATION
|
---|
22 |
|
---|
23 | [Sources]
|
---|
24 | StackCheckLibHostApplicationMsvc.c | MSFT
|
---|
25 | StackCheckLibNullGcc.c | GCC
|
---|
26 |
|
---|
27 | [Packages]
|
---|
28 | MdePkg/MdePkg.dec
|
---|
29 |
|
---|
30 | [BuildOptions]
|
---|
31 | # We cannot build the GCC version with LTO (link time optimization) because we run into linker errors where
|
---|
32 | # the stack cookie variable has been optimized away, as it looks to GCC like the variable is not used, because
|
---|
33 | # the compiler inserts the usage. We do not worry about the MSVC version here as it is a no-op.
|
---|
34 | GCC:*_*_*_CC_FLAGS = -fno-lto
|
---|