From c4622ac9205d2f1b42dac8c598e83113d39e7f11 Mon Sep 17 00:00:00 2001 From: hlopko Date: Fri, 6 Jul 2018 02:22:41 -0700 Subject: [PATCH] Fix autodetection of -z linker flags Clang reports missing -Wl,-z,relro as "ld: unknwon option: -z"). This cl fixes the autodetection to expect the short variant. Fixes #5468. RELNOTES: NONE. PiperOrigin-RevId: 203449206 --- tools/cpp/unix_cc_configure.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl index ccbc948ecd0d08..2056e5c41c7137 100644 --- a/tools/cpp/unix_cc_configure.bzl +++ b/tools/cpp/unix_cc_configure.bzl @@ -275,7 +275,7 @@ def _crosstool_content(repository_ctx, cc, cpu_value, darwin): repository_ctx, cc, "-Wl,-z,relro,-z,now", - "-z,relro,-z,now", + "-z", ) + ( [ "-undefined",