(obj, src, ext, cc_args, extra_postargs, pp_opts)
| 592 | paths[i] = os.path.abspath(paths[i]) |
| 593 | |
| 594 | def unix_wrap_single_compile(obj, src, ext, cc_args, extra_postargs, pp_opts) -> None: |
| 595 | # Copy before we make any modifications. |
| 596 | cflags = copy.deepcopy(extra_postargs) |
| 597 | try: |
| 598 | original_compiler = self.compiler.compiler_so |
| 599 | if _is_cuda_file(src): |
| 600 | nvcc = [_join_rocm_home('bin', 'hipcc') if IS_HIP_EXTENSION else _join_cuda_home('bin', 'nvcc')] |
| 601 | self.compiler.set_executable('compiler_so', nvcc) |
| 602 | if isinstance(cflags, dict): |
| 603 | cflags = cflags['nvcc'] |
| 604 | if IS_HIP_EXTENSION: |
| 605 | cflags = COMMON_HIPCC_FLAGS + cflags + _get_rocm_arch_flags(cflags) |
| 606 | else: |
| 607 | cflags = unix_cuda_flags(cflags) |
| 608 | elif isinstance(cflags, dict): |
| 609 | cflags = cflags['cxx'] |
| 610 | if IS_HIP_EXTENSION: |
| 611 | cflags = COMMON_HIP_FLAGS + cflags |
| 612 | append_std17_if_no_std_present(cflags) |
| 613 | |
| 614 | original_compile(obj, src, ext, cc_args, cflags, pp_opts) |
| 615 | finally: |
| 616 | # Put the original compiler back in place. |
| 617 | self.compiler.set_executable('compiler_so', original_compiler) |
| 618 | |
| 619 | def unix_wrap_ninja_compile(sources, |
| 620 | output_dir=None, |
nothing calls this directly
no test coverage detected