Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Oct 29, 2024
1 parent 5c5d997 commit 38748ea
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 39 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ WATCH?= @install @runtest
watch:
@dune build $(WATCH) -w

format:
@dune build @fmt --auto-promote

VERSION?=
dune-release-distrib:
@[ -n "$(VERSION)" ] || (echo "make sure to pass VERSION " && exit 1)
Expand Down
9 changes: 4 additions & 5 deletions examples/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

(executable
(name prof1)
(modes native)
(flags :standard -warn-error -a+8) ;-linkall)
(libraries tracy-client containers threads.posix))
(name prof1)
(modes native)
(flags :standard -warn-error -a+8) ;-linkall)
(libraries tracy-client containers threads.posix))
12 changes: 6 additions & 6 deletions src/bindings/client/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

; compile client

(foreign_library
(archive_name tracyclient)
(language cxx)
(include_dirs ../tracy/public/tracy/ ../tracy/public)
(flags -DTRACY_ENABLE=1 -fPIC -std=c++11 -O2)
(names TracyClient))
(archive_name tracyclient)
(language cxx)
(include_dirs ../tracy/public/tracy/ ../tracy/public)
(flags -DTRACY_ENABLE=1 -fPIC -std=c++11 -O2)
(names TracyClient))
37 changes: 19 additions & 18 deletions src/bindings/dune
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@

(library
(public_name tracy-client)
(name tracy_client)
(instrumentation.backend (ppx tracy-ppx))
(synopsis "Bindings to Tracy client library.")
(libraries threads.posix)
(flags :standard -warn-error -a+8 -linkall)
(foreign_archives client/tracyclient)
;(library_flags -cclib -ltracyclient -cclib -ltracy_stubs)
; compile our stubs + the client
(foreign_stubs
(language cxx) (names tracy_stubs)
(flags -Wall -fPIC -std=c++11 -O2)
(include_dirs ./tracy))
;(c_names tracy_stubs tracyclient)
(c_library_flags -lstdc++) ;-Lsrc/client -ltracyclient)
;(no_dynlink)
)
(public_name tracy-client)
(name tracy_client)
(instrumentation.backend
(ppx tracy-ppx))
(synopsis "Bindings to Tracy client library.")
(libraries threads.posix)
(flags :standard -warn-error -a+8 -linkall)
(foreign_archives client/tracyclient)
;(library_flags -cclib -ltracyclient -cclib -ltracy_stubs)
; compile our stubs + the client
(foreign_stubs
(language cxx)
(names tracy_stubs)
(flags -Wall -fPIC -std=c++11 -O2)
(include_dirs ./tracy))
;(c_names tracy_stubs tracyclient)
(c_library_flags -lstdc++) ;-Lsrc/client -ltracyclient)
;(no_dynlink)
)
8 changes: 4 additions & 4 deletions src/bindings/tracy_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type span = int
external _tracy_enter :
file:string -> fun_:string -> line:int -> name:string -> depth:int -> span
= "ml_tracy_enter"
[@@noalloc]
[@@noalloc]

external _tracy_exit : span -> unit = "ml_tracy_exit" [@@noalloc]
external _tracy_name_thread : string -> unit = "ml_tracy_name_thread"
Expand All @@ -16,13 +16,13 @@ external _tracy_plot : string -> float -> unit = "ml_tracy_plot" [@@noalloc]
external _tracy_app_info : string -> unit = "ml_tracy_app_info"

external _tracy_span_text : span -> string -> unit = "ml_tracy_span_text"
[@@noalloc]
[@@noalloc]

external _tracy_span_value : span -> int64 -> unit = "ml_tracy_span_value"
[@@noalloc]
[@@noalloc]

external _tracy_span_color : span -> int -> unit = "ml_tracy_span_color"
[@@noalloc]
[@@noalloc]

let enter ?cs_depth ~__FILE__:file ~__LINE__:line ?(__FUNCTION__ = "<fun>") name
: span =
Expand Down
9 changes: 4 additions & 5 deletions src/trace/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

(library
(name tracy_client_trace)
(public_name tracy-client.trace)
(synopsis "Trace interface for tracy-client")
(libraries tracy-client trace))
(name tracy_client_trace)
(public_name tracy-client.trace)
(synopsis "Trace interface for tracy-client")
(libraries tracy-client trace))
1 change: 0 additions & 1 deletion vendor/dune
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

(vendored_dirs tracy)

0 comments on commit 38748ea

Please sign in to comment.