Skip to content

Instantly share code, notes, and snippets.

@gahr
Created February 14, 2022 12:45
Show Gist options
  • Select an option

  • Save gahr/da40bac0569a629b7fe9578ce1e3b2e6 to your computer and use it in GitHub Desktop.

Select an option

Save gahr/da40bac0569a629b7fe9578ce1e3b2e6 to your computer and use it in GitHub Desktop.
% find . -type f -exec echo "*** {} ***" \; -exec cat {} \; -exec echo "" \;
*** ./src/sub/main.ml ***
let _ =
Printf.printf "Hey\n"
*** ./src/sub/dune ***
(executable
(name main))
*** ./dune-project ***
(lang dune 2.9)
*** ./dune ***
(env
(dev
(flags (:standard -w +42)))
(release
(flags (:standard -O3))))
% dune build --verbose --profile release
Workspace root: /usr/home/gahr/lang/ocaml/dune
Running[0]: /usr/bin/getconf _NPROCESSORS_ONLN > /tmp/dune7efe5b.output 2> /dev/null
Auto-detected concurrency: 3
disable binary cache
Running[1]: /usr/home/gahr/.opam/default/bin/ocamlc.opt -config > /tmp/dune589953.output
Dune context:
{ name = "default"
; kind = "default"
; profile = Release
; merlin = true
; for_host = None
; fdo_target_exe = None
; build_dir = "default"
; toplevel_path = Some External "/usr/home/gahr/.opam/default/lib/toplevel"
; ocaml_bin = External "/usr/home/gahr/.opam/default/bin"
; ocaml = Ok External "/usr/home/gahr/.opam/default/bin/ocaml"
; ocamlc = External "/usr/home/gahr/.opam/default/bin/ocamlc.opt"
; ocamlopt = Ok External "/usr/home/gahr/.opam/default/bin/ocamlopt.opt"
; ocamldep = Ok External "/usr/home/gahr/.opam/default/bin/ocamldep.opt"
; ocamlmklib = Ok External "/usr/home/gahr/.opam/default/bin/ocamlmklib.opt"
; env =
map
{ "DUNE_OCAML_HARDCODED" : "/usr/home/gahr/.opam/default/lib"
; "DUNE_OCAML_STDLIB" : "/usr/home/gahr/.opam/default/lib/ocaml"
; "DUNE_SOURCEROOT" : "/usr/home/gahr/lang/ocaml/dune"
; "INSIDE_DUNE" : "/usr/home/gahr/lang/ocaml/dune/_build/default"
; "MANPATH" :
"/usr/home/gahr/lang/ocaml/dune/_build/install/default/bin"
; "OCAMLFIND_IGNORE_DUPS_IN" :
"/usr/home/gahr/lang/ocaml/dune/_build/install/default/lib"
; "OCAMLPATH" :
"/usr/home/gahr/lang/ocaml/dune/_build/install/default/lib"
; "OCAMLTOP_INCLUDE_PATH" :
"/usr/home/gahr/lang/ocaml/dune/_build/install/default/lib/toplevel"
; "OCAML_COLOR" : "always"
; "OPAMCOLOR" : "always"
}
; findlib_path = [ External "/usr/home/gahr/.opam/default/lib" ]
; arch_sixtyfour = true
; natdynlink_supported = true
; supports_shared_libraries = true
; ocaml_config =
{ version = "4.13.1"
; standard_library_default = "/usr/home/gahr/.opam/default/lib/ocaml"
; standard_library = "/usr/home/gahr/.opam/default/lib/ocaml"
; standard_runtime = "the_standard_runtime_variable_was_deleted"
; ccomp_type = "cc"
; c_compiler = "cc"
; ocamlc_cflags =
[ "-O2"; "-fno-strict-aliasing"; "-fwrapv"; "-pthread"; "-fPIC" ]
; ocamlc_cppflags = [ "-D_FILE_OFFSET_BITS=64" ]
; ocamlopt_cflags =
[ "-O2"; "-fno-strict-aliasing"; "-fwrapv"; "-pthread"; "-fPIC" ]
; ocamlopt_cppflags = [ "-D_FILE_OFFSET_BITS=64" ]
; bytecomp_c_compiler =
[ "cc"
; "-O2"
; "-fno-strict-aliasing"
; "-fwrapv"
; "-pthread"
; "-fPIC"
; "-D_FILE_OFFSET_BITS=64"
]
; bytecomp_c_libraries = [ "-lm"; "-lpthread" ]
; native_c_compiler =
[ "cc"
; "-O2"
; "-fno-strict-aliasing"
; "-fwrapv"
; "-pthread"
; "-fPIC"
; "-D_FILE_OFFSET_BITS=64"
]
; native_c_libraries = [ "-lm" ]
; cc_profile = []
; architecture = "amd64"
; model = "default"
; int_size = 63
; word_size = 64
; system = "freebsd"
; asm = [ "cc"; "-c" ]
; asm_cfi_supported = true
; with_frame_pointers = false
; ext_exe = ""
; ext_obj = ".o"
; ext_asm = ".s"
; ext_lib = ".a"
; ext_dll = ".so"
; os_type = "Unix"
; default_executable_name = "a.out"
; systhread_supported = true
; host = "x86_64-unknown-freebsd13.0"
; target = "x86_64-unknown-freebsd13.0"
; profiling = false
; flambda = false
; spacetime = false
; safe_string = true
; exec_magic_number = "Caml1999X030"
; cmi_magic_number = "Caml1999I030"
; cmo_magic_number = "Caml1999O030"
; cma_magic_number = "Caml1999A030"
; cmx_magic_number = "Caml1999Y030"
; cmxa_magic_number = "Caml1999Z030"
; ast_impl_magic_number = "Caml1999M030"
; ast_intf_magic_number = "Caml1999N030"
; cmxs_magic_number = "Caml1999D030"
; cmt_magic_number = "Caml1999T030"
; natdynlink_supported = true
; supports_shared_libraries = true
; windows_unicode = false
}
}
Actual targets:
- alias @@default
Running[2]: (cd _build/default && /usr/home/gahr/.opam/default/bin/ocamlc.opt -w -40 -O3 -g -bin-annot -I src/sub/.main.eobjs/byte -no-alias-deps -o src/sub/.main.eobjs/byte/dune__exe__Main.cmo -c -impl src/sub/main.ml)
Command [2] exited with code 2:
$ (cd _build/default && /usr/home/gahr/.opam/default/bin/ocamlc.opt -w -40 -O3 -g -bin-annot -I src/sub/.main.eobjs/byte -no-alias-deps -o src/sub/.main.eobjs/byte/dune__exe__Main.cmo -c -impl src/sub/main.ml)
/usr/home/gahr/.opam/default/bin/ocamlc.opt: unknown option '-O3'.
Usage: ocamlc <options> <files>
Try 'ocamlc --help' for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment