CloudABI.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //===--- CloudABI.h - CloudABI 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. #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
  9. #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
  10. #include "Gnu.h"
  11. #include "clang/Driver/Tool.h"
  12. #include "clang/Driver/ToolChain.h"
  13. namespace clang {
  14. namespace driver {
  15. namespace tools {
  16. /// cloudabi -- Directly call GNU Binutils linker
  17. namespace cloudabi {
  18. class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
  19. public:
  20. Linker(const ToolChain &TC) : Tool("cloudabi::Linker", "linker", TC) {}
  21. bool hasIntegratedCPP() const override { return false; }
  22. bool isLinkJob() const override { return true; }
  23. void ConstructJob(Compilation &C, const JobAction &JA,
  24. const InputInfo &Output, const InputInfoList &Inputs,
  25. const llvm::opt::ArgList &TCArgs,
  26. const char *LinkingOutput) const override;
  27. };
  28. } // end namespace cloudabi
  29. } // end namespace tools
  30. namespace toolchains {
  31. class LLVM_LIBRARY_VISIBILITY CloudABI : public Generic_ELF {
  32. public:
  33. CloudABI(const Driver &D, const llvm::Triple &Triple,
  34. const llvm::opt::ArgList &Args);
  35. bool HasNativeLLVMSupport() const override { return true; }
  36. bool IsMathErrnoDefault() const override { return false; }
  37. bool IsObjCNonFragileABIDefault() const override { return true; }
  38. CXXStdlibType
  39. GetCXXStdlibType(const llvm::opt::ArgList &Args) const override {
  40. return ToolChain::CST_Libcxx;
  41. }
  42. void addLibCxxIncludePaths(
  43. const llvm::opt::ArgList &DriverArgs,
  44. llvm::opt::ArgStringList &CC1Args) const override;
  45. void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
  46. llvm::opt::ArgStringList &CmdArgs) const override;
  47. bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
  48. SanitizerMask getSupportedSanitizers() const override;
  49. SanitizerMask getDefaultSanitizers() const override;
  50. protected:
  51. Tool *buildLinker() const override;
  52. };
  53. } // end namespace toolchains
  54. } // end namespace driver
  55. } // end namespace clang
  56. #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H