Index: cfe/trunk/lib/Driver/Tools.cpp =================================================================== --- cfe/trunk/lib/Driver/Tools.cpp +++ cfe/trunk/lib/Driver/Tools.cpp @@ -919,11 +919,6 @@ else CmdArgs.push_back("-aarch64-global-merge=true"); } - - if (Args.hasArg(options::OPT_ffixed_x18)) { - CmdArgs.push_back("-backend-option"); - CmdArgs.push_back("-aarch64-reserve-x18"); - } } // Get CPU and ABI names. They are not independent @@ -1971,6 +1966,9 @@ else Features.push_back("-crc"); } + + if (Args.hasArg(options::OPT_ffixed_x18)) + Features.push_back("+reserve-x18"); } static void getTargetFeatures(const Driver &D, const llvm::Triple &Triple,