diff --git a/ThunkLibs/Generator/main.cpp b/ThunkLibs/Generator/main.cpp index 726e5cbfa4..d238fc1ea1 100644 --- a/ThunkLibs/Generator/main.cpp +++ b/ThunkLibs/Generator/main.cpp @@ -77,6 +77,7 @@ int main(int argc, char* const argv[]) { AdjustedArgs.push_back(std::string { "--target=" } + platform + "-linux-unknown"); AdjustedArgs.push_back("-isystem"); AdjustedArgs.push_back(std::string { "/usr/" } + platform + "-linux-gnu/include/"); + AdjustedArgs.push_back("-DGUEST_THUNK_LIBRARY"); return AdjustedArgs; }; GuestTool.appendArgumentsAdjuster(append_guest_args); diff --git a/ThunkLibs/GuestLibs/CMakeLists.txt b/ThunkLibs/GuestLibs/CMakeLists.txt index d32266516c..62cb78c430 100644 --- a/ThunkLibs/GuestLibs/CMakeLists.txt +++ b/ThunkLibs/GuestLibs/CMakeLists.txt @@ -51,7 +51,6 @@ function(generate NAME SOURCE_FILE) # Interface target for the user to add include directories add_library(${NAME}-guest-deps INTERFACE) target_include_directories(${NAME}-guest-deps INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/../include") - target_compile_definitions(${NAME}-guest-deps INTERFACE GUEST_THUNK_LIBRARY) if (BITNESS EQUAL 32) target_compile_definitions(${NAME}-guest-deps INTERFACE IS_32BIT_THUNK) endif () diff --git a/ThunkLibs/libfex_thunk_test/Host.cpp b/ThunkLibs/libfex_thunk_test/Host.cpp index 86ece9e36e..601d0f93e5 100644 --- a/ThunkLibs/libfex_thunk_test/Host.cpp +++ b/ThunkLibs/libfex_thunk_test/Host.cpp @@ -13,6 +13,7 @@ tags: thunklibs|fex_thunk_test #include "thunkgen_host_libfex_thunk_test.inl" +static_assert(offsetof(ReorderingType, a) == 0); static uint32_t fexfn_impl_libfex_thunk_test_QueryOffsetOf(guest_layout data, int index) { if (index == 0) { return offsetof(guest_layout::type, a); diff --git a/unittests/FEXLinuxTests/tests/thunks/thunk_testlib.cpp b/unittests/FEXLinuxTests/tests/thunks/thunk_testlib.cpp index c1ae5c564e..183a5c31dc 100644 --- a/unittests/FEXLinuxTests/tests/thunks/thunk_testlib.cpp +++ b/unittests/FEXLinuxTests/tests/thunks/thunk_testlib.cpp @@ -1,3 +1,5 @@ +#define GUEST_THUNK_LIBRARY + #include #include