Attention needed from Aaron Wood, Owners Override, Petr Hosek and Roland McGrath
Leonard Chan has uploaded the change for review![Open in Gerrit]()
Leonard Chan would like Owners Override to review this change.
Commit message
[magma] Prevent instrumenting magma's hermetic_static_library sources
Magma TUs were being instrumented with ASan which would result in a
dependency on compiler runtimes. The static library should be completely
hermetic and only depend on libc++. This ensures all the sources which
would go into the only hermetic_static_library do not get instrumented
with asan.
This is a temporary solution that unblocks the clang roll, but these
build files should be rewritten to ensure hermetic magma sources and
anything which would link in a hermetic magma are excluded from
instrumented builds.
Fixed: 447260106
Bug: 450424760
Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
Change diff
diff --git a/src/graphics/lib/magma/src/libmagma/BUILD.gn b/src/graphics/lib/magma/src/libmagma/BUILD.gn
index b444e5c..dd62b9d 100644
--- a/src/graphics/lib/magma/src/libmagma/BUILD.gn
+++ b/src/graphics/lib/magma/src/libmagma/BUILD.gn
@@ -22,6 +22,13 @@
# All functions should be declared in magma.h or magma_sysmem.h, so warn about unnecessary functions.
cflags = [ "-Wmissing-prototypes" ]
+ # TODO(https://fxbug.dev/450424760): TUs which would be part of a hermetic static library for magma
+ # should not be instrumented, hence we disable ASan here. Ideally, we should have build rules that
+ # ensure these sources and anything which link in libmagma_static would be excluded from instrumented
+ # builds. This is not a stable solution, but it prevents libmagma_static from having a mix of ASan-
+ # instrumented and non-asan instrumented libc++ functions.
+ cflags += [ "-fno-sanitize=address" ]
+
defines = [ "MAGMA_EXPORT=__attribute__((visibility(\"default\")))" ]
}
Change information
Files:
- M src/graphics/lib/magma/src/libmagma/BUILD.gn
Change size: XS
Delta: 1 file changed, 7 insertions(+), 0 deletions(-)
Open in GerritRelated details
Attention is currently required from:
- Aaron Wood
- Owners Override
- Petr Hosek
- Roland McGrath
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: I110d25944a5bc7094ab59ff011130d3d847f8287
Gerrit-Change-Number: 1386964
Gerrit-PatchSet: 3
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
.