Skip to content

Commit 2a5020c

Browse files
CEL Dev Teamcopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 960282268
1 parent a2265a8 commit 2a5020c

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

internal/new.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ std::pair<void*, size_t> SizeReturningAlignedNew(size_t size,
9292
std::align_val_t alignment) {
9393
ABSL_DCHECK(absl::has_single_bit(static_cast<size_t>(alignment)));
9494
#ifdef CEL_INTERNAL_HAVE_ALIGNED_NEW
95+
#if defined(_MSC_VER)
96+
return std::pair{::operator new(size, alignment), size};
97+
#else
9598
return std::pair{::operator new(size, alignment), size};
99+
#endif
96100
#else
97101
return std::pair{AlignedNew(size, alignment), size};
98102
#endif

parser/BUILD

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ cc_library(
2727
hdrs = [
2828
"parser.h",
2929
],
30-
copts = [
31-
"-fexceptions",
32-
],
30+
copts = select({
31+
"@rules_cc//cc/compiler:msvc-cl": ["/EHsc"],
32+
"@rules_cc//cc/compiler:clang-cl": ["/EHsc"],
33+
"//conditions:default": ["-fexceptions"],
34+
}),
3335
defines = [
3436
"ANTLR4CPP_STATIC",
3537
],

0 commit comments

Comments
 (0)