Skip to content

Commit

Permalink
The flags -x c++ should be passed as compile_flags, instead of `h…
Browse files Browse the repository at this point in the history
…ost_compile_flags` (#132)

This is not necessary, only will be triggered if we force nvcc to use wrapper device link.
  • Loading branch information
cloudhan authored Aug 9, 2023
1 parent ab09e0d commit bfe9c6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cuda/private/actions/dlink.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ def _wrapper_device_link(
system_includes = common.system_includes,
quote_includes = common.quote_includes,
# suppress cuda mode as c++ mode
host_compile_flags = common.host_compile_flags + ["-x", "c++"],
compile_flags = ["-x", "c++"],
host_compile_flags = common.host_compile_flags,
)
ret = compile(ctx, cuda_toolchain, cc_toolchain, srcs = [fatbin_c], common = compile_common, pic = pic, rdc = rdc, _prefix = "_objs/_dlink")
return ret[0]

0 comments on commit bfe9c6b

Please sign in to comment.