Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp +++ lib/Driver/Tools.cpp @@ -4767,6 +4767,17 @@ if (Args.hasFlag(options::OPT_fxray_instrument, options::OPT_fnoxray_instrument, false)) { + switch(getToolChain().getArch()) { + case llvm::Triple::arm: + case llvm::Triple::x86_64: + break; + default: + { + std::string feature("XRay for "); + feature += Triple.getArchName().data(); + D.Diag(diag::err_drv_clang_unsupported) << feature; + break; + } } CmdArgs.push_back("-fxray-instrument"); if (const Arg *A = Args.getLastArg(options::OPT_fxray_instruction_threshold_,