diff options
Diffstat (limited to 'include/clang/Driver')
-rw-r--r-- | include/clang/Driver/ArgList.h | 11 | ||||
-rw-r--r-- | include/clang/Driver/CC1Options.td | 3 | ||||
-rw-r--r-- | include/clang/Driver/Driver.h | 7 | ||||
-rw-r--r-- | include/clang/Driver/Options.td | 24 | ||||
-rw-r--r-- | include/clang/Driver/ToolChain.h | 13 |
5 files changed, 45 insertions, 13 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h index 3967dcc..9db170c 100644 --- a/include/clang/Driver/ArgList.h +++ b/include/clang/Driver/ArgList.h @@ -237,10 +237,19 @@ namespace driver { /// true if the option is present, false if the negation is present, and /// \p Default if neither option is given. If both the option and its /// negation are present, the last one wins. - bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const; + bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default = true) const; + + /// hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative + /// form \p Neg, return true if the option or its alias is present, false if + /// the negation is present, and \p Default if none of the options are + /// given. If multiple options are present, the last one wins. + bool hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg, + bool Default = true) const; /// AddLastArg - Render only the last argument match \p Id0, if present. void AddLastArg(ArgStringList &Output, OptSpecifier Id0) const; + void AddLastArg(ArgStringList &Output, OptSpecifier Id0, + OptSpecifier Id1) const; /// AddAllArgs - Render all arguments matching the given ids. void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index e4dd345..96a50fc 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -245,9 +245,6 @@ def fmessage_length : Separate<["-"], "fmessage-length">, MetaVarName<"<N>">, def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">, HelpText<"Silence ObjC rewriting warnings">; -def fwarn_on_spellcheck : Flag<["-"], "fwarn-on-spellcheck">, - HelpText<"Emit warning if spell-check is initiated, for testing">; - //===----------------------------------------------------------------------===// // Frontend Options //===----------------------------------------------------------------------===// diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 1330e95..d9053d1 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -335,6 +335,7 @@ public: const ToolChain *TC, const char *BoundArch, bool AtTopLevel, + bool MultipleArchs, const char *LinkingOutput, InputInfo &Result) const; @@ -346,11 +347,15 @@ public: /// \param JA - The action of interest. /// \param BaseInput - The original input file that this action was /// triggered by. + /// \param BoundArch - The bound architecture. /// \param AtTopLevel - Whether this is a "top-level" action. + /// \param MultipleArchs - Whether multiple -arch options were supplied. const char *GetNamedOutputPath(Compilation &C, const JobAction &JA, const char *BaseInput, - bool AtTopLevel) const; + const char *BoundArch, + bool AtTopLevel, + bool MultipleArchs) const; /// GetTemporaryPath - Return the pathname of a temporary file to use /// as part of compilation; the file will have the given prefix and suffix. diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 112feb7..3a5358a 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -181,6 +181,7 @@ def ObjCXX : Flag<["-"], "ObjC++">, Flags<[DriverOption]>, def ObjC : Flag<["-"], "ObjC">, Flags<[DriverOption]>, HelpText<"Treat source input files as Objective-C inputs">; def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option]>; +def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option]>; def P : Flag<["-"], "P">, Flags<[CC1Option]>, HelpText<"Disable linemarker output in -E mode">; def Qn : Flag<["-"], "Qn">; @@ -310,6 +311,11 @@ def fastcp : Flag<["-"], "fastcp">, Group<f_Group>; def fastf : Flag<["-"], "fastf">, Group<f_Group>; def fast : Flag<["-"], "fast">, Group<f_Group>; def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>; + +def fautolink : Flag <["-"], "fautolink">, Group<f_Group>; +def fno_autolink : Flag <["-"], "fno-autolink">, Group<f_Group>, Flags<[NoForward, CC1Option]>, + HelpText<"Disable generation of linker directives for automatic library linking">; + def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Enable the 'blocks' language feature">; def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>; @@ -327,9 +333,12 @@ def fcatch_undefined_behavior : Flag<["-"], "fcatch-undefined-behavior">, Group< def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>; def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Use colors in diagnostics">; +def fdiagnostics_color : Flag<["-"], "fdiagnostics-color">, Group<f_Group>; +def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>; def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>, HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">, MetaVarName<"<arg>">; +def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>; def fcommon : Flag<["-"], "fcommon">, Group<f_Group>; def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>; def fconstant_cfstrings : Flag<["-"], "fconstant-cfstrings">, Group<f_Group>; @@ -403,7 +412,7 @@ def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>, def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>; def fsanitize_address_zero_base_shadow : Flag<["-"], "fsanitize-address-zero-base-shadow">, Group<f_clang_Group>, Flags<[CC1Option]>, - HelpText<"Make AddressSanitizer map shadow memory" + HelpText<"Make AddressSanitizer map shadow memory " "at zero offset">; def fno_sanitize_address_zero_base_shadow : Flag<["-"], "fno-sanitize-address-zero-base-shadow">, Group<f_clang_Group>; @@ -507,10 +516,6 @@ def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">; def fmodules : Flag <["-"], "fmodules">, Group<f_Group>, Flags<[NoForward,CC1Option]>, HelpText<"Enable the 'modules' language feature">; -def fmodules_autolink : Flag <["-"], "fmodules-autolink">, Group<f_Group>, Flags<[NoForward,CC1Option]>, - HelpText<"Enable autolinking of the libraries for imported modules">; -def fno_modules_autolink : Flag <["-"], "fno-modules-autolink">, Group<f_Group>, - HelpText<"Disable autolinking of the libraries for imported modules">; def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Ignore the definition of the given macro when building and loading modules">; def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>; @@ -536,6 +541,7 @@ def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option]> def fno_caret_diagnostics : Flag<["-"], "fno-caret-diagnostics">, Group<f_Group>, Flags<[CC1Option]>; def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>; +def fno_diagnostics_color : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>; def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Compile common globals like normal definitions">; def fno_constant_cfstrings : Flag<["-"], "fno-constant-cfstrings">, Group<f_Group>, @@ -699,6 +705,9 @@ def fno_tree_vectorize : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize> def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>, HelpText<"Enable the superword-level parallelism vectorization passes">; def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>; +def fslp_vectorize_aggressive : Flag<["-"], "fslp-vectorize-aggressive">, Group<f_Group>, + HelpText<"Enable the BB vectorization passes">; +def fno_slp_vectorize_aggressive : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<f_Group>; def ftree_slp_vectorize : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>; def fno_tree_slp_vectorize : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>; def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">, @@ -928,6 +937,7 @@ def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]> HelpText<"Use software floating point">; def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>, HelpText<"Don't generate implicit floating point instructions">; +def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>; def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>; def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>; def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>; @@ -954,12 +964,16 @@ def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>; def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>; def mips16 : Flag<["-"], "mips16">, Group<m_Group>; def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_Group>; +def mmicromips : Flag<["-"], "mmicromips">, Group<m_Group>; +def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_Group>; def mxgot : Flag<["-"], "mxgot">, Group<m_Group>; def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_Group>; def mdsp : Flag<["-"], "mdsp">, Group<m_Group>; def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_Group>; def mdspr2 : Flag<["-"], "mdspr2">, Group<m_Group>; def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_Group>; +def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>; +def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>; def mips32 : Flag<["-"], "mips32">, Group<mips_CPUs_Group>, HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>; def mips32r2 : Flag<["-"], "mips32r2">, Group<mips_CPUs_Group>, diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h index ae9e397..aae3d79 100644 --- a/include/clang/Driver/ToolChain.h +++ b/include/clang/Driver/ToolChain.h @@ -82,6 +82,9 @@ protected: static void addExternCSystemInclude(const ArgList &DriverArgs, ArgStringList &CC1Args, const Twine &Path); + static void addExternCSystemIncludeIfExists(const ArgList &DriverArgs, + ArgStringList &CC1Args, + const Twine &Path); static void addSystemIncludes(const ArgList &DriverArgs, ArgStringList &CC1Args, ArrayRef<StringRef> Paths); @@ -195,9 +198,13 @@ public: /// \brief Test whether this toolchain defaults to PIC. virtual bool isPICDefault() const = 0; - /// \brief Tests whether this toolchain forces its default for PIC or non-PIC. - /// If this returns true, any PIC related flags should be ignored and instead - /// the result of \c isPICDefault() is used exclusively. + /// \brief Test whether this toolchain defaults to PIE. + virtual bool isPIEDefault() const = 0; + + /// \brief Tests whether this toolchain forces its default for PIC, PIE or + /// non-PIC. If this returns true, any PIC related flags should be ignored + /// and instead the results of \c isPICDefault() and \c isPIEDefault() are + /// used exclusively. virtual bool isPICDefaultForced() const = 0; /// SupportsProfiling - Does this tool chain support -pg. |