Skip to content

Commit

Permalink
Review comments (to squash)
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Dec 31, 2020
1 parent eaab3b2 commit 9183872
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Working version

- #9284: Add -config option to display the configuration of ocamlrun on stdout,
including the search path for shared stub libraries.
(David Allsopp, review by ???)
(David Allsopp, review by Xavier Leroy)

- #10025: Track custom blocks (e.g. Bigarray) with Statmemprof
(Stephen Dolan, review by Leo White, Gabriel Scherer and Jacques-Henri
Expand Down
66 changes: 30 additions & 36 deletions runtime/startup_byt.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,59 +374,53 @@ static void do_print_config(void)
char_os * dir;

/* Print the runtime configuration */
printf("version: %s\n"
"standard_library_default: %s\n"
"standard_library: %s\n"
"int_size: %d\n"
"word_size: %d\n"
"os_type: %s\n"
"host: %s\n"
"flat_float_array: %s\n"
"supports_afl: %s\n"
"windows_unicode: %s\n"
"supports_shared_libraries: %s\n"
"no_naked_pointers: %s\n"
"profinfo: %s\n"
"profinfo_width: %d\n"
"exec_magic_number: %s\n",
OCAML_VERSION_STRING,
caml_stat_strdup_of_os(OCAML_STDLIB_DIR),
caml_stat_strdup_of_os(caml_get_stdlib_location()),
8 * (int)sizeof(value),
8 * (int)sizeof(value) - 1,
OCAML_OS_TYPE,
HOST,
printf("version: %s\n", OCAML_VERSION_STRING);
printf("standard_library_default: %s\n",
caml_stat_strdup_of_os(OCAML_STDLIB_DIR));
printf("standard_library: %s\n",
caml_stat_strdup_of_os(caml_get_stdlib_location()));
printf("int_size: %d\n", 8 * (int)sizeof(value));
printf("word_size: %d\n", 8 * (int)sizeof(value) - 1);
printf("os_type: %s\n", OCAML_OS_TYPE);
printf("host: %s\n", HOST);
printf("flat_float_array: %s\n",
#ifdef FLAT_FLOAT_ARRAY
"true",
"true");
#else
"false",
"false");
#endif
#if HAS_SYS_SHM_H
"true",
printf("supports_afl: %s\n",
#ifdef HAS_SYS_SHM_H
"true");
#else
"false",
"false");
#endif
printf("windows_unicode: %s\n",
#if WINDOWS_UNICODE
"true",
"true");
#else
"false",
"false");
#endif
printf("supports_shared_libraries: %s\n",
#ifdef SUPPORT_DYNAMIC_LINKING
"true",
"true");
#else
"false",
"false");
#endif
printf("no_naked_pointers: %s\n",
#ifdef NO_NAKED_POINTERS
"true",
"true");
#else
"false",
"false");
#endif
printf("profinfo: %s\n"
"profinfo_width: %d\n",
#ifdef WITH_PROFINFO
"true", PROFINFO_WIDTH,
"true", PROFINFO_WIDTH);
#else
"false", 0,
"false", 0);
#endif
EXEC_MAGIC);
printf("exec_magic_number: %s\n", EXEC_MAGIC);

/* Parse ld.conf and print the effective search path */
puts("shared_libs_path:");
Expand Down

0 comments on commit 9183872

Please sign in to comment.