diff options
author | Rickard Green <[email protected]> | 2010-08-11 23:56:37 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-09-02 22:25:05 +0200 |
commit | a8a8183bca5765e50ed0c5bf3745c9624b6af958 (patch) | |
tree | 3cf284427a379c72510bfd9b071500bc2bf7bc69 /erts/emulator/beam/erl_bif_info.c | |
parent | e471254a16e94c1d23b2fd5d4255bc33eba3fcbf (diff) | |
download | otp-a8a8183bca5765e50ed0c5bf3745c9624b6af958.tar.gz otp-a8a8183bca5765e50ed0c5bf3745c9624b6af958.tar.bz2 otp-a8a8183bca5765e50ed0c5bf3745c9624b6af958.zip |
Add erlang:system_info(build_type)
Added erlang:system_info(build_type) which makes it
easier to chose drivers, NIF libraries, etc based
on build type of the runtime system.
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_info.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c index dace5b9297..40d8dc097c 100644 --- a/erts/emulator/beam/erl_bif_info.c +++ b/erts/emulator/beam/erl_bif_info.c @@ -1955,6 +1955,35 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1) : am_enabled); } #endif + } else if (BIF_ARG_1 == am_build_type) { +#if defined(DEBUG) + ERTS_DECL_AM(debug); + BIF_RET(AM_debug); +#elif defined(PURIFY) + ERTS_DECL_AM(purify); + BIF_RET(AM_purify); +#elif defined(QUANTIFY) + ERTS_DECL_AM(quantify); + BIF_RET(AM_quantify); +#elif defined(PURECOV) + ERTS_DECL_AM(purecov); + BIF_RET(AM_purecov); +#elif defined(ERTS_GCOV) + ERTS_DECL_AM(gcov); + BIF_RET(AM_gcov); +#elif defined(VALGRIND) + ERTS_DECL_AM(valgrind); + BIF_RET(AM_valgrind); +#elif defined(GPROF) + ERTS_DECL_AM(gprof); + BIF_RET(AM_gprof); +#elif defined(ERTS_ENABLE_LOCK_COUNT) + ERTS_DECL_AM(lcnt); + BIF_RET(AM_lcnt); +#else + BIF_RET(am_opt); +#endif + BIF_RET(res); } else if (BIF_ARG_1 == am_allocated_areas) { res = erts_allocated_areas(NULL, NULL, BIF_P); BIF_RET(res); |