@@ -70,7 +70,7 @@ fn main() {
7070 create_cuda_driver_bindings ( & sdk, & outdir, & manifest_dir) ;
7171 create_cuda_runtime_bindings ( & sdk, & outdir, & manifest_dir) ;
7272 create_cublas_bindings ( & sdk, & outdir, & manifest_dir) ;
73- create_nptx_compiler_bindings ( & sdk, & outdir, & manifest_dir) ;
73+ create_nvptx_compiler_bindings ( & sdk, & outdir, & manifest_dir) ;
7474 create_nvvm_bindings ( & sdk, & outdir, & manifest_dir) ;
7575
7676 if cfg ! ( any(
@@ -154,6 +154,20 @@ fn create_cuda_driver_bindings(
154154 . size_t_is_usize ( true )
155155 . layout_tests ( true )
156156 . must_use_type ( "CUresult" )
157+ // The CUDA docs have lots of malformed Doxygen directives, e.g.
158+ //
159+ // \sa
160+ // Foo,
161+ // Bar
162+ //
163+ // instead of
164+ //
165+ // \sa Foo
166+ // \sa Bar
167+ //
168+ // (And others.) If we try to convert these to rustdoc, even using the doxygen-bindgen
169+ // crate, we end up with rustdocs that trigger lots of warnings. So don't even try.
170+ . generate_comments ( false )
157171 . generate ( )
158172 . expect ( "Unable to generate CUDA driver bindings." ) ;
159173 bindings
@@ -203,6 +217,8 @@ fn create_cuda_runtime_bindings(
203217 . size_t_is_usize ( true )
204218 . layout_tests ( true )
205219 . must_use_type ( "cudaError_t" )
220+ // See the comment on `generate_comments` in `create_cuda_runtime_bindings`.
221+ . generate_comments ( false )
206222 . generate ( )
207223 . expect ( "Unable to generate CUDA runtime bindings." ) ;
208224 bindings
@@ -254,6 +270,8 @@ fn create_cublas_bindings(sdk: &cuda_sdk::CudaSdk, outdir: &path::Path, manifest
254270 . size_t_is_usize ( true )
255271 . layout_tests ( true )
256272 . must_use_type ( "cublasStatus_t" )
273+ // See the comment on `generate_comments` in `create_cuda_runtime_bindings`.
274+ . generate_comments ( false )
257275 . generate ( )
258276 . unwrap_or_else ( |_| panic ! ( "Unable to generate {pkg} bindings." ) ) ;
259277 bindings
@@ -262,7 +280,7 @@ fn create_cublas_bindings(sdk: &cuda_sdk::CudaSdk, outdir: &path::Path, manifest
262280 }
263281}
264282
265- fn create_nptx_compiler_bindings (
283+ fn create_nvptx_compiler_bindings (
266284 sdk : & cuda_sdk:: CudaSdk ,
267285 outdir : & path:: Path ,
268286 manifest_dir : & path:: Path ,
@@ -294,6 +312,8 @@ fn create_nptx_compiler_bindings(
294312 . size_t_is_usize ( true )
295313 . layout_tests ( true )
296314 . must_use_type ( "nvPTXCompileResult" )
315+ // See the comment on `generate_comments` in `create_cuda_runtime_bindings`.
316+ . generate_comments ( false )
297317 . generate ( )
298318 . expect ( "Unable to generate nvptx-compiler bindings." ) ;
299319 bindings
@@ -327,6 +347,8 @@ fn create_nvvm_bindings(sdk: &cuda_sdk::CudaSdk, outdir: &path::Path, manifest_d
327347 . size_t_is_usize ( true )
328348 . layout_tests ( true )
329349 . must_use_type ( "nvvmResult" )
350+ // See the comment on `generate_comments` in `create_cuda_runtime_bindings`.
351+ . generate_comments ( false )
330352 . generate ( )
331353 . expect ( "Unable to generate libNVVM bindings." ) ;
332354 bindings
0 commit comments