Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ file(GLOB BN_BASE_SOURCES CONFIGURE_DEPENDS *.cpp *.h unicode/*.h unicode/*.cpp)
add_library(binaryninjabase OBJECT ${BN_BASE_SOURCES})
set_target_properties(binaryninjabase PROPERTIES LINKER_LANGUAGE CXX)

target_include_directories(binaryninjabase
PUBLIC ${PROJECT_SOURCE_DIR})
get_filename_component(BN_API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
target_include_directories(binaryninjabase PUBLIC ${BN_API_DIR})

set_target_properties(binaryninjabase PROPERTIES
CXX_STANDARD 20
Expand Down
4 changes: 4 additions & 0 deletions base/assertions.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
#define BN_ASSERT_TRAP __builtin_trap()
#endif

// Forward-declare BNLogError so this header is self-contained, without
// pulling in all of binaryninjacore.h.
extern "C" void BNLogError(const char* fmt, ...);

#if BN_ASSERTIONS_ENABLED

// When assertions are enabled, reporting an assertion failure logs an error message then traps.
Expand Down
12 changes: 12 additions & 0 deletions base/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,15 @@

#define BN_IGNORE_DEPRECATION_WARNINGS_BEGIN BN_IGNORE_WARNINGS_BEGIN("-Wdeprecated-declarations", 4996)
#define BN_IGNORE_DEPRECATION_WARNINGS_END BN_IGNORE_WARNINGS_END

// BN_NO_UNIQUE_ADDRESS
//
// Allows a non-static data member of empty type to share storage with another
// member, removing the one-byte overhead the language otherwise requires. MSVC
// ignores the standard [[no_unique_address]] for ABI-compat reasons and
// provides [[msvc::no_unique_address]] instead.
#if defined(_MSC_VER)
#define BN_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
#else
#define BN_NO_UNIQUE_ADDRESS [[no_unique_address]]
#endif
Loading
Loading