diff options
| author | ruki <[email protected]> | 2023-09-21 22:40:21 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-21 22:40:21 +0800 |
| commit | 8afc0e7ed5d14918fa4fafd450b23263f62ea147 (patch) | |
| tree | 42ae5604bb4582d83028ba811a90ff623e9856a5 /xmake/modules/package/tools/xmake.lua | |
| parent | 3d9cf6af8a3fae36dbb5e8fe055a54000ddcadfb (diff) | |
enable asan for package
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index 528ad4985..3f679ef7d 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -250,6 +250,13 @@ function _get_configs(package, configs, opt) policies = "build.optimization.lto" end end + if package:config("asan") and (not policies or not policies:find("build.sanitizer.address", 1, true)) then + if policies then + policies = policies .. ",build.sanitizer.address" + else + policies = "build.sanitizer.address" + end + end if not package:use_external_includes() and (not policies or not policies:find("package.include_external_headers", 1, true)) then if policies then policies = policies .. ",package.include_external_headers:n" |
