Skip to content

Commit

Permalink
fix: declare deps for ccomp detection (#6610)
Browse files Browse the repository at this point in the history
* fix: declare deps for ccomp detection

This ensures that c++ compiler can be detected even with an explicit
`--sandbox`.

Fixes #6415

Signed-off-by: Etienne Millon <[email protected]>
  • Loading branch information
emillon authored Nov 30, 2022
1 parent a8bd126 commit ad833ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Unreleased

- Fix configurator when using the MSVC compiler (#6538, fixes #6537, @nojb)

- Fix missing dependencies when detecting the kind of C compiler we're using
(#6610, fixes #6415, @emillon)

3.6.0 (2022-11-14)
------------------

Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/cxx_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let rules ~sctx ~dir =
[ (match Ocaml_config.ccomp_type ocfg with
| Msvc -> A "/EP"
| Other _ -> As [ "-E"; "-P" ])
; A Path.(to_absolute_filename (build header_file))
; Path (Path.build header_file)
]
in
let action =
Expand Down
7 changes: 7 additions & 0 deletions test/blackbox-tests/test-cases/cxx-flags.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ With use_standard_c_and_cxx_flags = true

$ [ -f _build/default/.dune/ccomp/ccomp ]

(this also works with sandbox=symlink, #6415)

$ dune exec --sandbox symlink ./main.exe
2046
4096
Hello World Baz!
Hello World Bazexe!

ccomp is not computed if not required
=====================================
Expand Down

0 comments on commit ad833ef

Please sign in to comment.