42bafbe
diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build
42bafbe
--- a/security/sandbox/linux/moz.build
42bafbe
+++ b/security/sandbox/linux/moz.build
3cf2eff
@@ -114,9 +114,8 @@
42bafbe
 # gcc lto likes to put the top level asm in syscall.cc in a different partition
42bafbe
 # from the function using it which breaks the build.  Work around that by
42bafbe
 # forcing there to be only one partition.
3cf2eff
-for f in CONFIG["OS_CXXFLAGS"]:
3cf2eff
-    if f.startswith("-flto") and CONFIG["CC_TYPE"] != "clang":
3cf2eff
-        LDFLAGS += ["--param lto-partitions=1"]
42bafbe
+if CONFIG['CC_TYPE'] != 'clang':
42bafbe
+    LDFLAGS += ['--param', 'lto-partitions=1']
42bafbe
 
3cf2eff
 DEFINES["NS_NO_XPCOM"] = True
42bafbe
 DisableStlWrapping()