Top Level Namespace
Defined Under Namespace
Modules: Fiddle
Instance Method Summary collapse
- #disable_optimization_build_flag(flags) ⇒ Object
- #enable_debug_build_flag(flags) ⇒ Object
-
#gcc? ⇒ Boolean
:stopdoc:.
Instance Method Details
#disable_optimization_build_flag(flags) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'ext/fiddle/extconf.rb', line 23 def disable_optimization_build_flag(flags) if gcc? = RbConfig.(flags.dup) optimization_option_pattern = /(^|\s)?-O\d(\s|$)?/ if optimization_option_pattern.match?() .gsub(optimization_option_pattern, '\\1-Og\\2') else flags + " -Og" end else flags end end |
#enable_debug_build_flag(flags) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'ext/fiddle/extconf.rb', line 37 def enable_debug_build_flag(flags) if gcc? = RbConfig.(flags.dup) debug_option_pattern = /(^|\s)-g(?:gdb)?\d?(\s|$)/ if debug_option_pattern.match?() .gsub(debug_option_pattern, '\\1-ggdb3\\2') else flags + " -ggdb3" end else flags end end |
#gcc? ⇒ Boolean
:stopdoc:
19 20 21 |
# File 'ext/fiddle/extconf.rb', line 19 def gcc? RbConfig::CONFIG["GCC"] == "yes" end |