1*e8d8bef9SDimitry Andric //===--- ZOS.cpp - z/OS ToolChain Implementations ---------------*- C++ -*-===// 2*e8d8bef9SDimitry Andric // 3*e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*e8d8bef9SDimitry Andric // 7*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8*e8d8bef9SDimitry Andric 9*e8d8bef9SDimitry Andric #include "ZOS.h" 10*e8d8bef9SDimitry Andric #include "CommonArgs.h" 11*e8d8bef9SDimitry Andric #include "clang/Driver/Compilation.h" 12*e8d8bef9SDimitry Andric #include "clang/Driver/Options.h" 13*e8d8bef9SDimitry Andric #include "llvm/Option/ArgList.h" 14*e8d8bef9SDimitry Andric 15*e8d8bef9SDimitry Andric using namespace clang::driver; 16*e8d8bef9SDimitry Andric using namespace clang::driver::toolchains; 17*e8d8bef9SDimitry Andric using namespace llvm::opt; 18*e8d8bef9SDimitry Andric using namespace clang; 19*e8d8bef9SDimitry Andric 20*e8d8bef9SDimitry Andric ZOS::ZOS(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 21*e8d8bef9SDimitry Andric : ToolChain(D, Triple, Args) {} 22*e8d8bef9SDimitry Andric 23*e8d8bef9SDimitry Andric ZOS::~ZOS() {} 24*e8d8bef9SDimitry Andric 25*e8d8bef9SDimitry Andric void ZOS::addClangTargetOptions(const ArgList &DriverArgs, 26*e8d8bef9SDimitry Andric ArgStringList &CC1Args, 27*e8d8bef9SDimitry Andric Action::OffloadKind DeviceOffloadKind) const { 28*e8d8bef9SDimitry Andric // Pass "-faligned-alloc-unavailable" only when the user hasn't manually 29*e8d8bef9SDimitry Andric // enabled or disabled aligned allocations. 30*e8d8bef9SDimitry Andric if (!DriverArgs.hasArgNoClaim(options::OPT_faligned_allocation, 31*e8d8bef9SDimitry Andric options::OPT_fno_aligned_allocation)) 32*e8d8bef9SDimitry Andric CC1Args.push_back("-faligned-alloc-unavailable"); 33*e8d8bef9SDimitry Andric } 34