diff options
| author | KOBAYASHI Shuji <[email protected]> | 2021-01-28 18:42:19 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2021-01-28 18:42:19 +0900 |
| commit | c858cba3e95f820a956f72607c9af494f70b9304 (patch) | |
| tree | bd8c01bb114f356df823a473ae425f0256a6dfa0 /tasks | |
| parent | 56842628b9968d2786be7b9c772ee8f8fb51248d (diff) | |
| download | mruby-c858cba3e95f820a956f72607c9af494f70b9304.tar.gz mruby-c858cba3e95f820a956f72607c9af494f70b9304.zip | |
Refine `preprocess_options`; ref d95ffb036
If we modify an option that may have been specified by users, we may
make unintended changes, so it is better not to modify it as much as
possible, IMO.
Diffstat (limited to 'tasks')
| -rw-r--r-- | tasks/toolchains/gcc.rake | 4 | ||||
| -rw-r--r-- | tasks/toolchains/openwrt.rake | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tasks/toolchains/gcc.rake b/tasks/toolchains/gcc.rake index 8714e1854..a39f087ba 100644 --- a/tasks/toolchains/gcc.rake +++ b/tasks/toolchains/gcc.rake @@ -3,7 +3,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params| compiler_flags = %w(-g -O3 -Wall -Wundef) c_mandatory_flags = %w(-std=gnu99) cxx_invalid_flags = %w(-Werror-implicit-function-declaration) - compile_opt = '%{flags} -MMD -MF "%{outfile}.d" -o "%{outfile}" "%{infile}"' + compile_opt = '%{flags} -o "%{outfile}" "%{infile}"' [conf.cc, conf.objc, conf.asm, conf.cxx].each do |compiler| if compiler == conf.cxx @@ -15,7 +15,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params| end compiler.option_include_path = %q[-I"%s"] compiler.option_define = '-D%s' - compiler.compile_options = "-c #{compile_opt}" + compiler.compile_options = %|-MMD -MF "%{outfile}.d" -c #{compile_opt}| compiler.preprocess_options = "-E -P #{compile_opt}" compiler.cxx_compile_flag = '-x c++ -std=gnu++03' compiler.cxx_exception_flag = '-fexceptions' diff --git a/tasks/toolchains/openwrt.rake b/tasks/toolchains/openwrt.rake index d5763d8de..a903ddd49 100644 --- a/tasks/toolchains/openwrt.rake +++ b/tasks/toolchains/openwrt.rake @@ -11,7 +11,8 @@ MRuby::Toolchain.new(:openwrt) do |conf| end cc.option_include_path = %q[-I"%s"] cc.option_define = '-D%s' - cc.compile_options = %q[%{flags} -MMD -MF "%{outfile}.d" -o "%{outfile}" -c "%{infile}"] + cc.compile_options = '%{flags} -MMD -MF "%{outfile}.d" -o "%{outfile}" -c "%{infile}"' + cc.preprocess_options = '%{flags} -o "%{outfile}" -E -P "%{infile}"' end conf.linker do |linker| |
