Skip to content

Commit

Permalink
We do not expose exceptions for nvrtc
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Jun 10, 2024
1 parent bccd65d commit 001ff04
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-no-exceptions
// UNSUPPORTED: nvrtc

// explicit bad_expected_access(E e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-no-exceptions
// UNSUPPORTED: nvrtc

// E& error() & noexcept;
// const E& error() const & noexcept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

// UNSUPPORTED: c++03, c++11
// UNSUPPORTED: libcpp-no-exceptions
// UNSUPPORTED: nvrtc

// const char* what() const noexcept override;

Expand Down
4 changes: 4 additions & 0 deletions libcudacxx/test/utils/libcudacxx/test/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,8 @@ def parse_config_site_and_add_features(self, header):

def configure_compile_flags_exceptions(self):
enable_exceptions = self.get_lit_bool('enable_exceptions', True)
nvrtc = self.get_lit_bool('is_nvrtc', False)

if not enable_exceptions:
self.config.available_features.add('libcpp-no-exceptions')
if 'nvhpc' in self.config.available_features:
Expand All @@ -976,6 +978,8 @@ def configure_compile_flags_exceptions(self):
if self.cxx.type == 'nvcc':
self.cxx.compile_flags += ['-Xcompiler']
self.cxx.compile_flags += ['-fno-exceptions']
elif nvrtc:
self.config.available_features.add('libcpp-no-exceptions')

def configure_compile_flags_rtti(self):
enable_rtti = self.get_lit_bool('enable_rtti', True)
Expand Down

0 comments on commit 001ff04

Please sign in to comment.