Index: include/clang/Driver/CC1Options.td =================================================================== --- include/clang/Driver/CC1Options.td +++ include/clang/Driver/CC1Options.td @@ -25,7 +25,7 @@ HelpText<"Target specific attributes">; def triple : Separate<["-"], "triple">, HelpText<"Specify target triple (e.g. i686-apple-darwin9)">; -def target_abi : Separate<["-"], "target-abi">, +def target_abi : Separate<["-"], "target-abi">, Group, HelpText<"Target a particular ABI type">; } @@ -134,20 +134,22 @@ def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">; def dwarf_version_EQ : Joined<["-"], "dwarf-version=">; -def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">; +def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">, + Group; def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">, HelpText<"The compilation directory to embed in the debug info.">; def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">, HelpText<"The string to embed in the Dwarf debug flags record.">; -def mno_exec_stack : Flag<["-"], "mnoexecstack">, +def mno_exec_stack : Flag<["-"], "mnoexecstack">, Group, HelpText<"Mark the file as not needing an executable stack">; def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">, - HelpText<"Make assembler warnings fatal">; + Group, HelpText<"Make assembler warnings fatal">; def mrelax_relocations : Flag<["--"], "mrelax-relocations">, + Group, HelpText<"Use relaxable elf relocations">; def compress_debug_sections : Flag<["-"], "compress-debug-sections">, - HelpText<"Compress DWARF debug sections using zlib">; -def msave_temp_labels : Flag<["-"], "msave-temp-labels">, + Group, HelpText<"Compress DWARF debug sections using zlib">; +def msave_temp_labels : Flag<["-"], "msave-temp-labels">, Group, HelpText<"Save temporary labels in the symbol table. " "Note this may change .s semantics and shouldn't generally be used " "on compiler-generated code.">; @@ -210,9 +212,9 @@ HelpText<"Turn off Type Based Alias Analysis">; def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">, HelpText<"Turn off struct-path aware Type Based Alias Analysis">; -def masm_verbose : Flag<["-"], "masm-verbose">, +def masm_verbose : Flag<["-"], "masm-verbose">, Group, HelpText<"Generate verbose assembly output">; -def mcode_model : Separate<["-"], "mcode-model">, +def mcode_model : Separate<["-"], "mcode-model">, Group, HelpText<"The code model to use">; def mdebug_pass : Separate<["-"], "mdebug-pass">, HelpText<"Enable additional debug output">; @@ -221,20 +223,23 @@ def mdisable_tail_calls : Flag<["-"], "mdisable-tail-calls">, HelpText<"Disable tail call optimization, keeping the call stack accurate">; def menable_no_infinities : Flag<["-"], "menable-no-infs">, + Group, HelpText<"Allow optimization to assume there are no infinities.">; -def menable_no_nans : Flag<["-"], "menable-no-nans">, +def menable_no_nans : Flag<["-"], "menable-no-nans">, Group, HelpText<"Allow optimization to assume there are no NaNs.">; def menable_unsafe_fp_math : Flag<["-"], "menable-unsafe-fp-math">, + Group, HelpText<"Allow unsafe floating-point math optimizations which may decrease " "precision">; def mfloat_abi : Separate<["-"], "mfloat-abi">, HelpText<"The float ABI to use">; def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">, + Group, HelpText<"Limit float precision to the given value">; def split_stacks : Flag<["-"], "split-stacks">, HelpText<"Try to use a split stack if possible.">; def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">, - HelpText<"Do not put zero initialized data in the BSS">; + Group, HelpText<"Do not put zero initialized data in the BSS">; def backend_option : Separate<["-"], "backend-option">, HelpText<"Additional arguments to forward to LLVM backend (during code gen)">; def mregparm : Separate<["-"], "mregparm">, @@ -527,7 +532,7 @@ HelpText<"Weakly link in the blocks runtime">; def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">, HelpText<"Assume all functions with C linkage do not unwind">; -def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, +def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group, HelpText<"Use SjLj style exceptions">; def split_dwarf_file : Separate<["-"], "split-dwarf-file">, HelpText<"File name to use for split dwarf debug info output">; @@ -674,14 +679,17 @@ def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">; def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, + Group, HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">; def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, HelpText<"OpenCL only. Generate kernel argument metadata.">; def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, + Group, HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable">; def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, + Group, HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__">; -def cl_mad_enable : Flag<["-"], "cl-mad-enable">, +def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group, HelpText<"OpenCL only. Enable less precise MAD instructions to be generated.">; def cl_std_EQ : Joined<["-"], "cl-std=">, HelpText<"OpenCL language standard to compile for">; Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -116,6 +116,11 @@ def clang_ignored_gcc_optimization_f_Group : OptionGroup< "">, Group; +// Groups for options that affects CodeGen but not encoded in bitcode. +def codegen_Group : OptionGroup<"">; +def codegen_f_Group : OptionGroup<"">, Group; +def codegen_m_Group : OptionGroup<"">, Group; + ///////// // Options @@ -310,7 +315,7 @@ def T : JoinedOrSeparate<["-"], "T">, Group; def U : JoinedOrSeparate<["-"], "U">, Group, Flags<[CC1Option]>; def V : JoinedOrSeparate<["-"], "V">, Flags<[DriverOption, Unsupported]>; -def Wa_COMMA : CommaJoined<["-"], "Wa,">, +def Wa_COMMA : CommaJoined<["-"], "Wa,">, Group, HelpText<"Pass the comma separated arguments in to the assembler">, MetaVarName<"">; def Wall : Flag<["-"], "Wall">, Group, Flags<[CC1Option]>; @@ -336,7 +341,7 @@ def Xanalyzer : Separate<["-"], "Xanalyzer">, HelpText<"Pass to the static analyzer">, MetaVarName<"">; def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[DriverOption]>; -def Xassembler : Separate<["-"], "Xassembler">, +def Xassembler : Separate<["-"], "Xassembler">, Group, HelpText<"Pass to the assembler">, MetaVarName<"">; def Xclang : Separate<["-"], "Xclang">, HelpText<"Pass to the clang compiler">, MetaVarName<"">, @@ -432,8 +437,8 @@ def fno_PIE : Flag<["-"], "fno-PIE">, Group; def faccess_control : Flag<["-"], "faccess-control">, Group; def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group; -def fapple_kext : Flag<["-"], "fapple-kext">, Group, Flags<[CC1Option]>, - HelpText<"Use Apple's kernel extensions ABI">; +def fapple_kext : Flag<["-"], "fapple-kext">, Group, + Flags<[CC1Option]>, HelpText<"Use Apple's kernel extensions ABI">; def fapple_pragma_pack : Flag<["-"], "fapple-pragma-pack">, Group, Flags<[CC1Option]>, HelpText<"Enable Apple gcc-compatible #pragma pack handling">; def shared_libasan : Flag<["-"], "shared-libasan">; @@ -454,7 +459,8 @@ HelpText<"Disable generation of linker directives for automatic library linking">; def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">, - Group, Flags<[DriverOption, CC1Option]>, MetaVarName<"