bmk icon indicating copy to clipboard operation
bmk copied to clipboard

Fix: Correct no-exceptions removal for cc_opts and opts

Open GWRon opened this issue 10 months ago • 2 comments

"print" is incorrect but not caught as error messages in the bmk files are ignored there. Also the "opts" replaced stuff in "cc_opts" incorrectly.

While ":find()" can return Null, ":gsub" simply returns self even if nothing was changed

GWRon avatar Feb 08 '25 15:02 GWRon

Attention: This is variant2, there is variant1 too: https://github.com/bmx-ng/bmk/pull/138

It depends on what you want: variant1 assumes that fno-exception is just to remove from cc_opts. variant2 assumes that fno-exceptions should be removed from cc_opts AND opts.

GWRon avatar Feb 08 '25 15:02 GWRon

PS: https://blitzmax.org/docs/en/language/pre_post_compilation_scripts/

SuperStrict

' @bmk echo *** Building my cool app ***
' @bmk include "my_own_scripts.bmk"
'
' @bmk push cc_opts
' @bmk addccopt -DSPECIAL_OPTION
'
' @bmk make "src/someglue.cpp"
'
' @bmk pop cc_opts
' @bmk make "src/other.cpp"
'

The example is incorrect ...when adding/setting opts you now need a "key" (some name so you can override later)

The example itself won't compile because of https://github.com/bmx-ng/bcc/issues/656 (I simply added "newlines" between the commands to work around)

GWRon avatar Feb 08 '25 15:02 GWRon