Skip to content

Commit

Permalink
Remove -cc gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Aug 22, 2024
1 parent 238cb33 commit 08a6816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
(public_name ODiffBin)
(package odiff)
(flags
(:standard -w -27 -cc gcc))
(:standard -w -27))
(libraries odiff-core odiff-io cmdliner))
7 changes: 4 additions & 3 deletions io/config/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ let get_flags_from_env_or_run_pkg_conifg c ~env ~lib =
let c_flags_to_ocaml_opt_flags flags =
flags
|> List.filter_map (function
| opt when String.starts_with opt ~prefix:"-l" -> Some [ "-cclib"; opt ]
| _ -> None)
|> List.flatten
| opt when String.starts_with opt ~prefix:"-l" ->
let flag = String.sub opt 2 (String.length opt - 2) in
Some [ "-cclib"; "-l:" ^ flag ^ ".a" ]
| opt -> Some [ "-ccopt"; opt ]) |> List.flatten

let () =
C.main ~name:"odiff-c-lib-packae-resolver" (fun c ->
Expand Down

0 comments on commit 08a6816

Please sign in to comment.