ZOS.cpp 1.2 KB

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