Commit 8dbbc3f5 authored by Mart Lubbers's avatar Mart Lubbers
Browse files

cpm: check whether the profiling options are sane

There are some illegal combinations possible if you manually edit
project files. This patch bails out instead of allowing the compiler to
generate code that crashes.
parent d1e6eefb
......@@ -115,6 +115,10 @@ doProjectAction cleanhome pwd pn (BuildProject force ideenvs) world
# (proj_path, proj, ok, world) = openProject pwd pn cleanhome world
| not ok
= world
//Sanity checks on the project file to see if it is tampered with
# appopts = PR_GetApplicationOptions proj
| appopts.stack_traces && not appopts.profiling
= abort "Stack tracing is enabled but time profiling is not\n"
# (console, world) = stdio world
# iniGeneral = initGeneral True compilerOptions cleanhome proj_path proj envs console
# {ls, gst_world} = pinit force {ls=iniGeneral,gst_world=world,gst_continue_or_stop=False}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment