From 0810739d4c5ef01c1eb14d5de55285e01b0b9e0f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 6 Jan 2016 07:42:18 +0000 Subject: Add -fno-movt frontend option, to disable movt/movw on ARM Summary: In rL256641, @davide turned off movt generation by default for FreeBSD. This was because our ld is very old, and did not support the relocations for it. However, Ian Lepore added the support very recently, so we would like to revert rL256641, and replace it with a new `-fno-movt` frontend option. This way, it can be turned off when needed. Reviewers: dexonsmith, echristo, emaste, davide Subscribers: andrew, aemerson, rengolin, davide, cfe-commits, ahatanak, emaste Differential Revision: http://reviews.llvm.org/D15899 llvm-svn: 256920 --- clang/lib/Driver/Tools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index c6144522576..ba8d4059612 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -938,8 +938,8 @@ static void getARMTargetFeatures(const ToolChain &TC, if (Args.hasArg(options::OPT_ffixed_r9)) Features.push_back("+reserve-r9"); - // The kext and FreeBSD linkers don't know how to deal with movw/movt. - if (KernelOrKext || Triple.isOSFreeBSD()) + // The kext linker doesn't know how to deal with movw/movt. + if (KernelOrKext || Args.hasArg(options::OPT_mno_movt)) Features.push_back("+no-movt"); } -- cgit v1.2.3