Skip to content

Commit

Permalink
Upgrading to account for new scripts and adding to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkae committed Apr 25, 2024
1 parent 7839d1a commit efceaa8
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/symbols-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ jobs:
cmake --build build --target check-miral-symbols-map || RET=$?
cmake --build build --target check-miroil-symbols-map || RET=$?
cmake --build build --target check-mirserver-symbols-map || RET=$?
exit $RET
cmake --build build --target check-mircommon-symbols-map || RET=$?
exit $RET
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ build-*
cmake-*
build
benchmarks/build
tools/bot-data.tar.xz

tools/bot-data.tar.xz
29 changes: 20 additions & 9 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,23 @@ install(

add_custom_target(
generate-mircommon-symbols-map
COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/run.sh
--library-name mir_common
--version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}
--symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map"
--external-headers-directory="${PROJECT_SOURCE_DIR}/include/common"
--internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/common"
--include_dirs "$<JOIN:$<TARGET_PROPERTY:miral,INCLUDE_DIRECTORIES>,:>"
--output_symbols
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py
--library-name mir_common
--version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}
--symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map"
--external-headers-directory="${PROJECT_SOURCE_DIR}/include/common"
--internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/common"
--include-dirs="$<JOIN:$<TARGET_PROPERTY:mirserver,INCLUDE_DIRECTORIES>,:>"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")

add_custom_target(
check-mircommon-symbols-map
COMMAND ${PROJECT_SOURCE_DIR}/tools/symbols_map_generator/main.py
--library-name mir_common
--version ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}
--symbols-map-path="${CMAKE_CURRENT_SOURCE_DIR}/symbols.map"
--external-headers-directory="${PROJECT_SOURCE_DIR}/include/common"
--internal-headers-directory="${PROJECT_SOURCE_DIR}/src/include/common"
--include-dirs="$<JOIN:$<TARGET_PROPERTY:mirserver,INCLUDE_DIRECTORIES>,:>"
--diff
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
43 changes: 8 additions & 35 deletions src/common/symbols.map
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,9 @@ global:
MirWindowPlacementEvent::placement*;
MirWindowPlacementEvent::set_id*;
MirWindowPlacementEvent::set_placement*;
mir::::libname*;
mir::Executor::?Executor*;
mir::PosixRWMutex::?PosixRWMutex*;
mir::PosixRWMutex::PosixRWMutex*;
mir::PosixRWMutex::Type*;
mir::PosixRWMutex::lock*;
mir::PosixRWMutex::lock_shared*;
mir::PosixRWMutex::operator*;
Expand All @@ -330,8 +328,8 @@ global:
mir::SharedLibraryProberReport::?SharedLibraryProberReport*;
mir::SharedLibraryProberReport::SharedLibraryProberReport*;
mir::SharedLibraryProberReport::operator*;
mir::Signal::Signal*;
mir::Signal::?Signal*;
mir::Signal::Signal*;
mir::Signal::raise*;
mir::Signal::wait*;
mir::SignalBlocker::?SignalBlocker*;
Expand All @@ -349,11 +347,9 @@ global:
mir::dispatch::ActionQueue::enqueue*;
mir::dispatch::ActionQueue::relevant_events*;
mir::dispatch::ActionQueue::watch_fd*;
mir::dispatch::DispatchReentrancy*;
mir::dispatch::Dispatchable::?Dispatchable*;
mir::dispatch::Dispatchable::Dispatchable*;
mir::dispatch::Dispatchable::operator*;
mir::dispatch::FdEvent*;
mir::dispatch::MultiplexingDispatchable::?MultiplexingDispatchable*;
mir::dispatch::MultiplexingDispatchable::MultiplexingDispatchable*;
mir::dispatch::MultiplexingDispatchable::add_watch*;
Expand Down Expand Up @@ -394,7 +390,6 @@ global:
mir::events::make_window_placement_event*;
mir::events::make_window_resize_event*;
mir::events::map_positions*;
mir::events::operator*;
mir::events::scale_positions*;
mir::events::set_button_state*;
mir::events::set_cursor_position*;
Expand All @@ -413,7 +408,6 @@ global:
mir::input::BufferKeymap::make_unique_xkb_keymap*;
mir::input::BufferKeymap::matches*;
mir::input::BufferKeymap::model*;
mir::input::DeviceCapability*;
mir::input::Keymap::?Keymap*;
mir::input::Keymap::Keymap*;
mir::input::ParameterKeymap::ParameterKeymap*;
Expand Down Expand Up @@ -441,7 +435,6 @@ global:
mir::logging::Logger::operator*;
mir::logging::MultiLogger::MultiLogger*;
mir::logging::MultiLogger::log*;
mir::logging::Severity*;
mir::logging::format_message*;
mir::logging::input_timestamp*;
mir::logging::log*;
Expand All @@ -464,9 +457,6 @@ global:
mir::time::PosixTimestamp::now*;
mir::time::SteadyClock::min_wait_until*;
mir::time::SteadyClock::now*;
mir::time::assert_same_clock*;
mir::time::operator*;
mir::time::sleep_until*;
non-virtual?thunk?to?mir::Executor::?Executor*;
non-virtual?thunk?to?mir::SharedLibraryProberReport::?SharedLibraryProberReport*;
non-virtual?thunk?to?mir::ThreadPoolExecutor::spawn*;
Expand Down Expand Up @@ -504,12 +494,14 @@ global:
typeinfo?for?MirTouchEvent;
typeinfo?for?MirTouchpadConfig;
typeinfo?for?MirTouchscreenConfig;
typeinfo?for?mir::DeleteCPtr;
typeinfo?for?mir::Executor;
typeinfo?for?mir::IntOwnedFd;
typeinfo?for?mir::NonBlockingExecutor;
typeinfo?for?mir::PosixRWMutex;
typeinfo?for?mir::SharedLibrary;
typeinfo?for?mir::SharedLibraryProberReport;
typeinfo?for?mir::Signal;
typeinfo?for?mir::ThreadPoolExecutor;
typeinfo?for?mir::detail::RefCountedLibrary;
typeinfo?for?mir::dispatch::ActionQueue;
Expand All @@ -536,18 +528,11 @@ global:
typeinfo?for?mir::time::PosixTimestamp;
typeinfo?for?mir::time::SteadyClock;
vtable?for?MirCloseWindowEvent;
vtable?for?MirInputConfig;
vtable?for?MirInputDevice;
vtable?for?MirKeyboardConfig;
vtable?for?MirKeyboardEvent;
vtable?for?MirPointerConfig;
vtable?for?MirPointerEvent;
vtable?for?MirTouchEvent;
vtable?for?MirTouchpadConfig;
vtable?for?MirTouchscreenConfig;
vtable?for?mir::Executor;
vtable?for?mir::IntOwnedFd;
vtable?for?mir::NonBlockingExecutor;
vtable?for?mir::PosixRWMutex;
vtable?for?mir::SharedLibrary;
vtable?for?mir::SharedLibraryProberReport;
Expand All @@ -560,7 +545,6 @@ global:
vtable?for?mir::dispatch::ThreadedDispatcher;
vtable?for?mir::events::ContactState;
vtable?for?mir::events::InputDeviceState;
vtable?for?mir::events::TouchContactV2;
vtable?for?mir::graphics::NativeBuffer;
vtable?for?mir::input::BufferKeymap;
vtable?for?mir::input::Keymap;
Expand Down Expand Up @@ -599,11 +583,12 @@ global:
mir::ClientVisibleError::ClientVisibleError*;
mir::RecursiveWriteLock::?RecursiveWriteLock*;
mir::RecursiveWriteLock::RecursiveWriteLock*;
mir::Selection*;
mir::SignalBlocker::operator*;
mir::add*;
mir::clear*;
mir::for_each*;
mir::ThreadSafeList::add*;
mir::ThreadSafeList::clear*;
mir::ThreadSafeList::for_each*;
mir::ThreadSafeList::remove*;
mir::ThreadSafeList::remove_all*;
mir::graphics::Edid::Edid*;
mir::graphics::Edid::get_manufacturer*;
mir::graphics::Edid::get_monitor_name*;
Expand Down Expand Up @@ -631,8 +616,6 @@ global:
mir::logging::SharedLibraryProberReport::loading_library*;
mir::logging::SharedLibraryProberReport::probing_failed*;
mir::logging::SharedLibraryProberReport::probing_path*;
mir::remove*;
mir::remove_all*;
mir::time::Clock::?Clock*;
mir::time::Clock::Clock*;
mir::time::Clock::operator*;
Expand Down Expand Up @@ -683,7 +666,6 @@ global:
typeinfo?for?MirWindowPlacementEvent;
typeinfo?for?MirXkbModifiers;
typeinfo?for?mir::ClientVisibleError;
typeinfo?for?mir::DeleteCPtr;
typeinfo?for?mir::RecursiveReadLock;
typeinfo?for?mir::RecursiveReadWriteMutex;
typeinfo?for?mir::RecursiveWriteLock;
Expand All @@ -695,25 +677,16 @@ global:
typeinfo?for?mir::time::Clock;
vtable?for?MirEvent;
vtable?for?MirInputDeviceStateEvent;
vtable?for?MirInputEvent;
vtable?for?MirKeyboardResyncEvent;
vtable?for?MirOrientationEvent;
vtable?for?MirPromptSessionEvent;
vtable?for?MirResizeEvent;
vtable?for?MirWindowEvent;
vtable?for?MirWindowOutputEvent;
vtable?for?MirWindowPlacementEvent;
vtable?for?MirXkbModifiers;
vtable?for?mir::ClientVisibleError;
vtable?for?mir::DeleteCPtr;
vtable?for?mir::RecursiveReadLock;
vtable?for?mir::RecursiveReadWriteMutex;
vtable?for?mir::RecursiveWriteLock;
vtable?for?mir::SignalBlocker;
vtable?for?mir::graphics::Edid;
vtable?for?mir::input::KeyMapper;
vtable?for?mir::logging::SharedLibraryProberReport;
vtable?for?mir::report::lttng::TracepointProvider;
};
};

3 changes: 2 additions & 1 deletion tools/symbols_map_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def add_internal(s: str):
def search_class_hierarchy_for_virtual_thunk(derived: clang.cindex.Cursor):
assert (derived.kind == clang.cindex.CursorKind.CLASS_DECL
or derived.kind == clang.cindex.CursorKind.STRUCT_DECL
or derived.kind == clang.cindex.CursorKind.CLASS_TEMPLATE)
or derived.kind == clang.cindex.CursorKind.CLASS_TEMPLATE
or derived.kind == clang.cindex.CursorKind.TYPEDEF_DECL)

# Find the base classes for the derived class
base_classes: list[clang.cindex.Cursor] = []
Expand Down

0 comments on commit efceaa8

Please sign in to comment.