From 73474a8ae98f1a281a03c440a4d8b9987029cf4e Mon Sep 17 00:00:00 2001 From: Wolfgang Puffitsch Date: Tue, 19 Jan 2016 12:51:27 +0100 Subject: [PATCH] patmos: Make sure to turn on internalizing. --- lib/Driver/Tools.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 955817da85..a58a3bbbfb 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -4985,6 +4985,10 @@ bool patmos::PatmosBaseTool::ConstructOptJob(const Tool &Creator, if (DisableInternalize) { // works even if in front of -std-link-opts, which adds -internalize OptArgs.push_back("-disable-internalize"); + } else { + // for some reason, we need to add this manually + OptArgs.push_back("-internalize"); + OptArgs.push_back("-globaldce"); } // @see the note in Clang::AddPatmosTargetArgs()