File: EnvironmentVariables.def

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (141 lines) | stat: -rw-r--r-- 6,434 bytes parent folder | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
//===--- EnvironmentVariables.def - Debug variables. ------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines x-macros used for metaprogramming with the set of
// environment variables used for configuring or enabling debug features in the
// runtime.
//
//===----------------------------------------------------------------------===//

// #define VARIABLE(name, type, defaultValue, help)

#ifndef VARIABLE
#error "Must define VARIABLE to include EnvironmentVariables.def"
#endif

VARIABLE(SWIFT_DEBUG_ENABLE_METADATA_ALLOCATION_ITERATION, bool, false,
         "Enable additional metadata allocation tracking for swift-inspect to "
         "use.")

VARIABLE(SWIFT_DEBUG_ENABLE_METADATA_BACKTRACE_LOGGING, bool, false,
         "Enable logging of backtraces for each metadata allocation. Requires "
         "SWIFT_DEBUG_ENABLE_METADATA_ALLOCATION_ITERATION to be enabled.")

VARIABLE(SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT, uint8_t, 2,
         "Print warnings when using implicit @objc entrypoints. Set to "
         "desired reporting level, 0-3.")

VARIABLE(SWIFT_DETERMINISTIC_HASHING, bool, false,
         "Disable randomized hash seeding.")

VARIABLE(SWIFT_ENABLE_MANGLED_NAME_VERIFICATION, bool, false,
         "Enable verification that metadata can roundtrip through a mangled "
         "name each time metadata is instantiated.")

VARIABLE(SWIFT_DEBUG_ENABLE_MALLOC_SCRIBBLE, bool, false,
         "Scribble on runtime allocations such as metadata allocations.")

VARIABLE(SWIFT_DEBUG_ENABLE_COW_CHECKS, bool, false,
         "Enable internal checks for copy-on-write operations.")

VARIABLE(SWIFT_ENABLE_ASYNC_JOB_DISPATCH_INTEGRATION, bool, true,
         "Enable use of dispatch_async_swift_job when available.")

VARIABLE(SWIFT_DEBUG_VALIDATE_UNCHECKED_CONTINUATIONS, bool, false,
         "Check for and error on double-calls of unchecked continuations.")

#if defined(__APPLE__) && defined(__MACH__)

VARIABLE(SWIFT_DEBUG_VALIDATE_SHARED_CACHE_PROTOCOL_CONFORMANCES, bool, false,
         "Validate shared cache protocol conformance results against the "
         "lists of conformances in the shared cache images.")

VARIABLE(SWIFT_DEBUG_ENABLE_SHARED_CACHE_PROTOCOL_CONFORMANCES, bool, true,
         "Enable querying precomputed protocol conformances in the shared "
         "cache.")

#endif

VARIABLE(SWIFT_DEBUG_CONCURRENCY_ENABLE_COOPERATIVE_QUEUES, bool, true,
         "Enable dispatch cooperative queues in the global executor.")

#ifndef NDEBUG

VARIABLE(SWIFT_DEBUG_RUNTIME_EXCLUSIVITY_LOGGING, bool, false,
         "Enable the an asserts runtime to emit logging as it works.")

#endif

VARIABLE(SWIFT_BINARY_COMPATIBILITY_VERSION, uint32_t, 0,
        "Set the binary compatibility level of the Swift Standard Library")

VARIABLE(SWIFT_DEBUG_FAILED_TYPE_LOOKUP, bool, false,
         "Enable warnings when we fail to look up a type by name.")

VARIABLE(SWIFT_DEBUG_VALIDATE_EXTERNAL_GENERIC_METADATA_BUILDER, uint8_t, 0,
         "Validate the external metadata builder by running it in parallel "
         "with the runtime's builder, and checking that they produce the same "
         "output. Level 0 does no validation. Level 1 does silent validation "
         "unless a validation failure occurs. Level 2 enables full debug "
         "logging in the builder.")

VARIABLE(SWIFT_DEBUG_ENABLE_LIB_PRESPECIALIZED_METADATA, bool, true,
         "Enable use of metadata in prespecializations library.")

VARIABLE(SWIFT_DEBUG_ENABLE_LIB_PRESPECIALIZED_DESCRIPTOR_LOOKUP, bool, true,
         "Enable use of descriptor map in prespecializations library.")

VARIABLE(SWIFT_DEBUG_VALIDATE_LIB_PRESPECIALIZED_DESCRIPTOR_LOOKUP, bool, false,
         "Validate results from the prespecializations map descriptor map by "
         "comparing to a full scan.")

VARIABLE(SWIFT_DEBUG_LIB_PRESPECIALIZED_PATH, string, "",
         "A path to a prespecializations library to use at runtime. In order "
         "to be used, this library must be loaded into the process by other "
         "means (such as DYLD_INSERT_LIBRARIES) before Swift tries to use it.")

VARIABLE(SWIFT_DEBUG_LIB_PRESPECIALIZED_DISABLED_PROCESSES, string, "",
         "A colon-separated list of process names where the prespecializations "
         "library will be forcibly disabled.")

VARIABLE(SWIFT_DEBUG_LIB_PRESPECIALIZED_ENABLED_PROCESSES, string, "",
         "A colon-separated list of process names where the prespecializations "
         "library will be forcibly enabled. This overrides the disabled "
         "processes list in the prespecializations library, as well as the "
         "list in SWIFT_DEBUG_LIB_PRESPECIALIZED_DISABLED_PROCESSES.")

VARIABLE(SWIFT_DEBUG_ENABLE_LIB_PRESPECIALIZED_LOGGING, bool, false,
         "Enable debug logging of prespecializations library use.")

VARIABLE(SWIFT_ROOT, string, "",
         "Overrides the root directory of the Swift installation. "
         "This is used to locate auxiliary files relative to the runtime "
         "itself.")

VARIABLE(SWIFT_BACKTRACE, string, "",
         "A comma-separated list of key=value pairs that controls the "
         "crash catching and backtracing support in the runtime. "
         "See docs/Backtracing.rst in the Swift repository for details.")

VARIABLE(SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE, string, "",
         "Allows for suppressing 'is current executor' equality check crashes. "
         "As since Swift 6.0 checking for current executor equality, may crash "
         "and will never return 'false' because we are calling into library "
         "implemented SerialExecutor.checkIsolation which should crash if the "
         "isolation is not the expected one. Some old code may rely on the "
         "non-crashing behavior. This flag enables temporarily restoring the "
         "legacy 'nocrash' behavior until adopting code has been adjusted. "
         "Legal values are: "
         " 'legacy' (Legacy behavior), "
         " 'swift6' (Swift 6.0+ behavior)")

#undef VARIABLE