Top Level Namespace
Defined Under Namespace
Modules: Mysql2Replication
Instance Method Summary
collapse
Instance Method Details
#disable_optimization_build_flag(flags) ⇒ Object
12
13
14
15
16
17
18
|
# File 'ext/mysql2-replication/extconf.rb', line 12
def disable_optimization_build_flag(flags)
if gcc?
RbConfig.expand(flags.dup).gsub(/(^|\s)?-O\d(\s|$)?/, '\\1-O0\\2')
else
flags
end
end
|
#enable_debug_build_flag(flags) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'ext/mysql2-replication/extconf.rb', line 20
def enable_debug_build_flag(flags)
if gcc?
expanded_flags = RbConfig.expand(flags.dup)
debug_option_pattern = /(^|\s)-g(?:gdb)?\d?(\s|$)/
if debug_option_pattern =~ expanded_flags
expanded_flags.gsub(debug_option_pattern, '\\1-ggdb3\\2')
else
flags + " -ggdb3"
end
else
flags
end
end
|
#gcc? ⇒ Boolean
8
9
10
|
# File 'ext/mysql2-replication/extconf.rb', line 8
def gcc?
CONFIG["GCC"] == "yes"
end
|