servo/python/servo
Jonathan Schwender 39ee27eea6
mach: Allow using ASAN on ohos (#37185)
Allow using ASAN on OpenHarmony by adding target specific configuration.
This also relaxes the version requirement for the clang compiler
when using asan, since asan also has runtime checks, which should fail
if instrumented code relies on an incompatible libasan version (not
tested).

Additional comments: 

- Remove `TARGET_LDFLAGS = -static-libasan` since anyway rustc
  invokes the linker, so this flag has no effect.
- Enable frame pointers with ASAN, since we are anyway debugging.
  It should probably be the default anyway.
- We pass the with_asan option also to mach package, since hvigor
  needs to know that we are building for ASAN, otherwise it leads
  to a crash at startup.

Testing: Tested manually on arm64 OpenHarmony.

Known issues: ASAN increases the stack usage, and this can cause
segfaults due to hitting the stack protector on more complex pages. A
follow-up PR could address this by increasing the stack size when
compiled with asan in threads that hit this issue.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
2025-06-04 09:48:07 +00:00
..
devtools_tests/sources Devtools: add automated test for Debugger > Sources (#36401) 2025-05-07 10:43:18 +00:00
mutation Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
platform mach: Allow using ASAN on ohos (#37185) 2025-06-04 09:48:07 +00:00
__init__.py Fix tidy issues with Python files in python/ 2015-06-02 19:51:41 -04:00
bootstrap_commands.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
build_commands.py mach: Allow using ASAN on ohos (#37185) 2025-06-04 09:48:07 +00:00
command_base.py mach: Allow using ASAN on ohos (#37185) 2025-06-04 09:48:07 +00:00
devenv_commands.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
devtools_tests.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
gstreamer.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
package_commands.py mach: Allow using ASAN on ohos (#37185) 2025-06-04 09:48:07 +00:00
post_build_commands.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
testing_commands.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
try_parser.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
util.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00
visual_studio.py Use ruff to enforce python code formatting (#37117) 2025-05-26 11:54:43 +00:00