Skip to content

Commit 9346fc9

Browse files
committed
Add ocaml-option-clang-cl for MSVC clang-cl compiler support
clang-cl is a drop-in replacement for cl.exe that uses LLVM/Clang with an MSVC-compatible interface. This adds an ocaml-option-clang-cl package following the established ocaml-option-* pure marker pattern, allowing CC=clang-cl to be properly scoped to the OCaml compiler build rather than leaking into the global environment. Changes: - New package: ocaml-option-clang-cl.1 (depends on system-msvc, available on win32 only) - ocaml-options-vanilla: add unconditional conflict - ocaml-variants.5.2.0+msvc: add as depopt with CC=clang-cl build arg - ocaml-compiler.5.3.0 through 5.6: add as depopt with CC=clang-cl build arg
1 parent 76bf2ed commit 9346fc9

15 files changed

Lines changed: 40 additions & 0 deletions

File tree

  • packages
    • ocaml-compiler
      • ocaml-compiler.5.3.0
      • ocaml-compiler.5.3
      • ocaml-compiler.5.4.0~alpha1
      • ocaml-compiler.5.4.0~beta1
      • ocaml-compiler.5.4.0~beta2
      • ocaml-compiler.5.4.0~rc1
      • ocaml-compiler.5.4.0
      • ocaml-compiler.5.4.1
      • ocaml-compiler.5.4
      • ocaml-compiler.5.5.0~alpha1
      • ocaml-compiler.5.5
      • ocaml-compiler.5.6
    • ocaml-option-clang-cl/ocaml-option-clang-cl.1
    • ocaml-options-vanilla/ocaml-options-vanilla.1
    • ocaml-variants/ocaml-variants.5.2.0+msvc

packages/ocaml-compiler/ocaml-compiler.5.3.0/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ build: [
9292
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9393
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9494
"LIBS=-static" {ocaml-option-static:installed}
95+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9596
"--disable-warn-error"
9697
]
9798
[make "-j%{jobs}%"]
@@ -105,6 +106,7 @@ depopts: [
105106
"ocaml-option-32bit"
106107
"ocaml-option-afl"
107108
"ocaml-option-bytecode-only"
109+
"ocaml-option-clang-cl"
108110
"ocaml-option-no-flat-float-array"
109111
"ocaml-option-flambda"
110112
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.3/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ build: [
110110
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
111111
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
112112
"LIBS=-static" {ocaml-option-static:installed}
113+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
113114
"--disable-warn-error"
114115
]
115116
[make "-j%{jobs}%"]
@@ -122,6 +123,7 @@ depopts: [
122123
"ocaml-option-32bit"
123124
"ocaml-option-afl"
124125
"ocaml-option-bytecode-only"
126+
"ocaml-option-clang-cl"
125127
"ocaml-option-no-flat-float-array"
126128
"ocaml-option-flambda"
127129
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4.0/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ build: [
9292
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9393
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9494
"LIBS=-static" {ocaml-option-static:installed}
95+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9596
"--disable-warn-error"
9697
]
9798
[make "-j%{jobs}%"]
@@ -105,6 +106,7 @@ depopts: [
105106
"ocaml-option-32bit"
106107
"ocaml-option-afl"
107108
"ocaml-option-bytecode-only"
109+
"ocaml-option-clang-cl"
108110
"ocaml-option-no-flat-float-array"
109111
"ocaml-option-flambda"
110112
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4.0~alpha1/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ build: [
9595
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9696
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9797
"LIBS=-static" {ocaml-option-static:installed}
98+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9899
"--disable-warn-error"
99100
]
100101
[make "-j%{jobs}%"]
@@ -108,6 +109,7 @@ depopts: [
108109
"ocaml-option-32bit"
109110
"ocaml-option-afl"
110111
"ocaml-option-bytecode-only"
112+
"ocaml-option-clang-cl"
111113
"ocaml-option-no-flat-float-array"
112114
"ocaml-option-flambda"
113115
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4.0~beta1/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ build: [
9595
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9696
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9797
"LIBS=-static" {ocaml-option-static:installed}
98+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9899
"--disable-warn-error"
99100
]
100101
[make "-j%{jobs}%"]
@@ -108,6 +109,7 @@ depopts: [
108109
"ocaml-option-32bit"
109110
"ocaml-option-afl"
110111
"ocaml-option-bytecode-only"
112+
"ocaml-option-clang-cl"
111113
"ocaml-option-no-flat-float-array"
112114
"ocaml-option-flambda"
113115
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4.0~beta2/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ build: [
9595
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9696
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9797
"LIBS=-static" {ocaml-option-static:installed}
98+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9899
"--disable-warn-error"
99100
]
100101
[make "-j%{jobs}%"]
@@ -108,6 +109,7 @@ depopts: [
108109
"ocaml-option-32bit"
109110
"ocaml-option-afl"
110111
"ocaml-option-bytecode-only"
112+
"ocaml-option-clang-cl"
111113
"ocaml-option-no-flat-float-array"
112114
"ocaml-option-flambda"
113115
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4.0~rc1/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ build: [
9595
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9696
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9797
"LIBS=-static" {ocaml-option-static:installed}
98+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9899
"--disable-warn-error"
99100
]
100101
[make "-j%{jobs}%"]
@@ -108,6 +109,7 @@ depopts: [
108109
"ocaml-option-32bit"
109110
"ocaml-option-afl"
110111
"ocaml-option-bytecode-only"
112+
"ocaml-option-clang-cl"
111113
"ocaml-option-no-flat-float-array"
112114
"ocaml-option-flambda"
113115
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4.1/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ build: [
9292
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9393
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9494
"LIBS=-static" {ocaml-option-static:installed}
95+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9596
"--disable-warn-error"
9697
]
9798
[make "-j%{jobs}%"]
@@ -105,6 +106,7 @@ depopts: [
105106
"ocaml-option-32bit"
106107
"ocaml-option-afl"
107108
"ocaml-option-bytecode-only"
109+
"ocaml-option-clang-cl"
108110
"ocaml-option-no-flat-float-array"
109111
"ocaml-option-flambda"
110112
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.4/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ build: [
110110
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
111111
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
112112
"LIBS=-static" {ocaml-option-static:installed}
113+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
113114
"--disable-warn-error"
114115
]
115116
[make "-j%{jobs}%"]
@@ -122,6 +123,7 @@ depopts: [
122123
"ocaml-option-32bit"
123124
"ocaml-option-afl"
124125
"ocaml-option-bytecode-only"
126+
"ocaml-option-clang-cl"
125127
"ocaml-option-no-flat-float-array"
126128
"ocaml-option-flambda"
127129
"ocaml-option-fp"

packages/ocaml-compiler/ocaml-compiler.5.5.0~alpha1/opam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ build: [
9393
"--host=i386-linux" {ocaml-option-32bit:installed & os="linux"}
9494
"--host=i386-apple-darwin13.2.0" {ocaml-option-32bit:installed & os="macos"}
9595
"LIBS=-static" {ocaml-option-static:installed}
96+
"CC=clang-cl" {ocaml-option-clang-cl:installed}
9697
"--disable-warn-error"
9798
]
9899
]
@@ -105,6 +106,7 @@ depopts: [
105106
"ocaml-option-32bit"
106107
"ocaml-option-afl"
107108
"ocaml-option-bytecode-only"
109+
"ocaml-option-clang-cl"
108110
"ocaml-option-no-flat-float-array"
109111
"ocaml-option-flambda"
110112
"ocaml-option-fp"

0 commit comments

Comments
 (0)