File tree Expand file tree Collapse file tree 4 files changed +29
-8
lines changed Expand file tree Collapse file tree 4 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 1- (lang dune 2 .9 )
1+ (lang dune 3 .2 )
22(name tiny_httpd)
33( generate_opam_files true )
44
Original file line number Diff line number Diff line change 1+ ; Set BUILD_TINY_HTTPD_OPTLEVEL to the -O<num> level.
2+ ; Defaults to 2, which means -O2 is the default C optimization flag.
3+ ; Use -1 to remove the -O<num> flag entirely.
4+ (rule
5+ (enabled_if (>= %{env:BUILD_TINY_HTTPD_OPTLEVEL=2} 0))
6+ (target optlevel.string)
7+ (deps (env_var BUILD_TINY_HTTPD_OPTLEVEL))
8+ (action (with-stdout-to %{target} (echo "-O%{env:BUILD_TINY_HTTPD_OPTLEVEL=2}"))))
9+ (rule
10+ (enabled_if (< %{env:BUILD_TINY_HTTPD_OPTLEVEL=2} 0))
11+ (target optlevel.string)
12+ (deps (env_var BUILD_TINY_HTTPD_OPTLEVEL))
13+ (action (with-stdout-to %{target} (echo ""))))
14+
15+ ; All compilers will include the optimization level.
16+ ; Non-MSVC compilers will include `-std=c99 -fPIC`.
17+ (rule
18+ (enabled_if (= %{ocaml-config:ccomp_type} msvc))
19+ (target cflags.sexp)
20+ (action (with-stdout-to %{target} (echo "(%{read:optlevel.string})"))))
21+ (rule
22+ (enabled_if (not (= %{ocaml-config:ccomp_type} msvc)))
23+ (target cflags.sexp)
24+ (action (with-stdout-to %{target} (echo "(-std=c99 -fPIC %{read:optlevel.string})"))))
25+
126(library
227 (name tiny_httpd_ws)
328 (public_name tiny_httpd.ws)
732 (foreign_stubs
833 (language c)
934 (names tiny_httpd_ws_stubs)
10- (flags :standard -std=c99 -fPIC -O2 ))
35+ (flags :standard (:include cflags.sexp) ))
1136 (libraries
1237 (re_export tiny_httpd.core)
1338 threads))
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ tags: [
1111homepage: "https://github.com/c-cube/tiny_httpd/"
1212bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
1313depends: [
14- "dune" {>= "2.9 "}
14+ "dune" {>= "3.2 "}
1515 "seq"
1616 "base-threads"
1717 "result"
@@ -38,11 +38,9 @@ build: [
3838 name
3939 "-j"
4040 jobs
41- "--promote-install-files=false"
4241 "@install"
4342 "@runtest" {with-test}
4443 "@doc" {with-doc}
4544 ]
46- ["dune" "install" "-p" name "--create-install-files" name]
4745]
4846dev-repo: "git+https://github.com/c-cube/tiny_httpd.git"
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ license: "MIT"
88homepage: "https://github.com/c-cube/tiny_httpd/"
99bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
1010depends: [
11- "dune" {>= "2.9 "}
11+ "dune" {>= "3.2 "}
1212 "tiny_httpd" {= version}
1313 "camlzip" {>= "1.06"}
1414 "iostream-camlzip" {>= "0.2.1"}
@@ -24,11 +24,9 @@ build: [
2424 name
2525 "-j"
2626 jobs
27- "--promote-install-files=false"
2827 "@install"
2928 "@runtest" {with-test}
3029 "@doc" {with-doc}
3130 ]
32- ["dune" "install" "-p" name "--create-install-files" name]
3331]
3432dev-repo: "git+https://github.com/c-cube/tiny_httpd.git"
You can’t perform that action at this time.
0 commit comments