================ @@ -107,3 +110,294 @@ void Cygwin::AddClangSystemIncludeArgs(const ArgList &DriverArgs, addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include"); addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include/w32api"); } + +static bool getStaticPIE(const ArgList &Args, const ToolChain &TC) { + bool HasStaticPIE = Args.hasArg(options::OPT_static_pie); + if (HasStaticPIE && Args.hasArg(options::OPT_no_pie)) { + const Driver &D = TC.getDriver(); + const llvm::opt::OptTable &Opts = D.getOpts(); + StringRef StaticPIEName = Opts.getOptionName(options::OPT_static_pie); + StringRef NoPIEName = Opts.getOptionName(options::OPT_nopie); + D.Diag(diag::err_drv_cannot_mix_options) << StaticPIEName << NoPIEName; + } + return HasStaticPIE; +} + +static bool getStatic(const ArgList &Args) { + return Args.hasArg(options::OPT_static) && + !Args.hasArg(options::OPT_static_pie); +} + +void cygwin::Linker::ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, + const InputInfoList &Inputs, + const ArgList &Args, + const char *LinkingOutput) const { + const auto &ToolChain = getToolChain(); + const Driver &D = ToolChain.getDriver(); + + const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU(); + const bool IsVE = ToolChain.getTriple().isVE(); ---------------- kikairoya wrote:
VE means https://www.phoronix.com/news/LLVM-NEC-VE-Official ? Cygwin can't run on it. https://github.com/llvm/llvm-project/pull/147960 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits