clang-tool-chain 1.1.2__py3-none-any.whl → 1.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- clang_tool_chain/__version__.py +1 -1
- clang_tool_chain/execution/sanitizer_env.py +25 -13
- {clang_tool_chain-1.1.2.dist-info → clang_tool_chain-1.1.3.dist-info}/METADATA +1 -1
- {clang_tool_chain-1.1.2.dist-info → clang_tool_chain-1.1.3.dist-info}/RECORD +7 -7
- {clang_tool_chain-1.1.2.dist-info → clang_tool_chain-1.1.3.dist-info}/WHEEL +0 -0
- {clang_tool_chain-1.1.2.dist-info → clang_tool_chain-1.1.3.dist-info}/entry_points.txt +0 -0
- {clang_tool_chain-1.1.2.dist-info → clang_tool_chain-1.1.3.dist-info}/licenses/LICENSE +0 -0
clang_tool_chain/__version__.py
CHANGED
|
@@ -160,9 +160,10 @@ def prepare_sanitizer_environment(
|
|
|
160
160
|
compiler_flags: List of compiler flags used to build the executable.
|
|
161
161
|
Used to detect which sanitizers are enabled. If None, no options
|
|
162
162
|
are injected (safe default).
|
|
163
|
-
suppression_file: Optional path to custom LSan suppression file.
|
|
164
|
-
If
|
|
165
|
-
|
|
163
|
+
suppression_file: Optional path to additional custom LSan suppression file.
|
|
164
|
+
If provided, this file is merged with built-in platform-specific
|
|
165
|
+
suppressions (built-in applied first, then custom).
|
|
166
|
+
Set to empty string "" to disable built-in suppressions entirely.
|
|
166
167
|
|
|
167
168
|
Returns:
|
|
168
169
|
Environment dictionary with sanitizer options injected as appropriate.
|
|
@@ -184,7 +185,7 @@ def prepare_sanitizer_environment(
|
|
|
184
185
|
... compiler_flags=["-fsanitize=address"],
|
|
185
186
|
... suppression_file="/path/to/custom.txt"
|
|
186
187
|
... )
|
|
187
|
-
>>> # Uses custom suppression
|
|
188
|
+
>>> # Uses BOTH built-in AND custom suppression files (merged)
|
|
188
189
|
"""
|
|
189
190
|
env = base_env.copy() if base_env is not None else os.environ.copy()
|
|
190
191
|
|
|
@@ -225,22 +226,33 @@ def prepare_sanitizer_environment(
|
|
|
225
226
|
|
|
226
227
|
# Add platform-specific LSan suppressions if LSAN is enabled
|
|
227
228
|
if lsan_enabled:
|
|
228
|
-
#
|
|
229
|
-
|
|
230
|
-
suppression_file = _get_builtin_suppression_file()
|
|
229
|
+
# Check if user explicitly disabled built-in suppressions with ""
|
|
230
|
+
disable_builtin = suppression_file == ""
|
|
231
231
|
|
|
232
|
-
#
|
|
233
|
-
|
|
232
|
+
# Helper to append suppression file to LSAN_OPTIONS
|
|
233
|
+
def _append_suppression(file_path: Path) -> None:
|
|
234
234
|
current_lsan = env.get("LSAN_OPTIONS", "")
|
|
235
|
-
suppression_opt = f"suppressions={
|
|
235
|
+
suppression_opt = f"suppressions={file_path.absolute()}"
|
|
236
236
|
|
|
237
237
|
if current_lsan:
|
|
238
|
-
# Append to existing options
|
|
239
238
|
env["LSAN_OPTIONS"] = f"{current_lsan}:{suppression_opt}"
|
|
240
239
|
else:
|
|
241
|
-
# Set new options
|
|
242
240
|
env["LSAN_OPTIONS"] = suppression_opt
|
|
243
241
|
|
|
244
|
-
logger.info(f"Injecting LSan suppression file: {
|
|
242
|
+
logger.info(f"Injecting LSan suppression file: {file_path}")
|
|
243
|
+
|
|
244
|
+
# First, apply built-in platform-specific suppressions (unless disabled)
|
|
245
|
+
if not disable_builtin:
|
|
246
|
+
builtin_file = _get_builtin_suppression_file()
|
|
247
|
+
if builtin_file and builtin_file.exists():
|
|
248
|
+
_append_suppression(builtin_file)
|
|
249
|
+
|
|
250
|
+
# Then, also apply custom suppression file if provided (merge behavior)
|
|
251
|
+
if suppression_file and suppression_file != "":
|
|
252
|
+
custom_path = Path(suppression_file)
|
|
253
|
+
if custom_path.exists():
|
|
254
|
+
_append_suppression(custom_path)
|
|
255
|
+
else:
|
|
256
|
+
logger.warning(f"Custom suppression file not found: {suppression_file}")
|
|
245
257
|
|
|
246
258
|
return env
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clang-tool-chain
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Clang Tool Chain - C/C++ compilation toolchain utilities
|
|
5
5
|
Project-URL: Homepage, https://github.com/zackees/clang-tool-chain
|
|
6
6
|
Project-URL: Repository, https://github.com/zackees/clang-tool-chain
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
clang_tool_chain/__init__.py,sha256=u-qgOuQxh5W2g7n8BgUtBnUWsK66rM4N6LJXY9PiEx0,880
|
|
2
|
-
clang_tool_chain/__version__.py,sha256=
|
|
2
|
+
clang_tool_chain/__version__.py,sha256=9aF3qsv8HoxAYFRckzQBjJmtctXtRBzyFxsX7lsktLc,71
|
|
3
3
|
clang_tool_chain/archive.py,sha256=t3reh7cm5XP2rhTqfRIDAQZv5XQq7SsstyiROYg8wFA,27697
|
|
4
4
|
clang_tool_chain/archive_cache.py,sha256=5ZmlwXIJZDcrDFkTbdgBQYN9sulGn0WyI6qwWqC4HEU,6806
|
|
5
5
|
clang_tool_chain/checksums.py,sha256=KFXeAeDz5ZlcZVOxsHDpNDCrm9UDoJ8bMA4PeNhuzdA,9868
|
|
@@ -49,7 +49,7 @@ clang_tool_chain/execution/iwyu.py,sha256=bmP0d_PZObA1JfmFYp3qIOKCb7y32AWPm2_ReF
|
|
|
49
49
|
clang_tool_chain/execution/lldb.py,sha256=VpxkWTPS6PsyskaKTALeziR5Z5NLwarW174Fm1SMX9k,20718
|
|
50
50
|
clang_tool_chain/execution/nodejs_resolver.py,sha256=8QsJWvIfmt5mBDV7n0ypSjsPyXS-eZTizhBli937I-g,11172
|
|
51
51
|
clang_tool_chain/execution/platform_executor.py,sha256=sF4GyW0ujy2EewG8y2Eo1gUWGzss5G5iIkv02w7-2_o,14362
|
|
52
|
-
clang_tool_chain/execution/sanitizer_env.py,sha256
|
|
52
|
+
clang_tool_chain/execution/sanitizer_env.py,sha256=bLGUATKNnuB8WxWt1eopVgEh6bsZzkmpcpGxYOeRcHk,10642
|
|
53
53
|
clang_tool_chain/installers/__init__.py,sha256=NAV5woPCEDKSbFr1UmfQsrg4Ua5UdghN4q7H3ymvRsg,279
|
|
54
54
|
clang_tool_chain/installers/base.py,sha256=OS78bau9zoYPitmhla7pKsfCPEj-zLY0DkvVzjE31Tw,15437
|
|
55
55
|
clang_tool_chain/installers/clang.py,sha256=rUtheVRF7mq_1YdmQ3XzIybrJqsHbm2Xf0cbhRbH7RQ,16994
|
|
@@ -71,8 +71,8 @@ clang_tool_chain/symbolizer/unwind_windows.h,sha256=XTWhJDv13AAMUPAzWCfRN7tO6EbN
|
|
|
71
71
|
clang_tool_chain/testing/__init__.py,sha256=-sYqOOCuTV_u-MkmExrD4uKdTHG4RmMwR3D1kIG281Q,208
|
|
72
72
|
clang_tool_chain/testing/diagnostic_runner.py,sha256=mnmFUEOQulY3-Ggu6hKVGZwjrKQNmV6kY80PRTUu2qU,5293
|
|
73
73
|
clang_tool_chain/testing/diagnostic_tests.py,sha256=GmtKWrDcddZTpx9_yIKfhRAy6YOde8dj7SksCWVEME4,6019
|
|
74
|
-
clang_tool_chain-1.1.
|
|
75
|
-
clang_tool_chain-1.1.
|
|
76
|
-
clang_tool_chain-1.1.
|
|
77
|
-
clang_tool_chain-1.1.
|
|
78
|
-
clang_tool_chain-1.1.
|
|
74
|
+
clang_tool_chain-1.1.3.dist-info/METADATA,sha256=enxAhFiBH36eUVqcz_ljHgQDSU9KFV8h23kVYAnAcKk,60267
|
|
75
|
+
clang_tool_chain-1.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
76
|
+
clang_tool_chain-1.1.3.dist-info/entry_points.txt,sha256=N0a0OVPkCFbf6BisRkHj-m2TcZ-f1mqxfXxAHQxfrQg,2800
|
|
77
|
+
clang_tool_chain-1.1.3.dist-info/licenses/LICENSE,sha256=51FO1oc2pZbQNI0v0_THnznnZIF4iFgawG1xnQ58kKo,10997
|
|
78
|
+
clang_tool_chain-1.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|