From 533dc5866b4c167c19d2e243ef26e1eda4966313 Mon Sep 17 00:00:00 2001 From: Jeremy Leconte Date: Thu, 19 Dec 2024 18:00:14 +0100 Subject: [PATCH] Use PIE when compiling tests on Linux. This is an attempt to make linux_msan bot less flaky which is suggested by the error message: FATAL: Make sure to compile with -fPIE and to link with -pie. Bug: None Change-Id: I43f4e5c10d9a4c42a8ef5a67bf77806f0c09bf98 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6111093 Reviewed-by: Mirko Bonadei Commit-Queue: Jeremy Leconte --- BUILD.gn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index f51d1113d..f37f43a38 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -395,6 +395,8 @@ if (libyuv_include_tests) { if (is_linux || is_chromeos) { cflags = [ "-fexceptions" ] + # For enabling ASLR. + ldflags = [ "-pie" ] } if (is_ios) { configs -= [ "//build/config/compiler:default_symbols" ]