Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EMSCRIPTEN build #198

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mdiem-sc
Copy link

  • Fixes easy_profiler_core build on emscripten.
  • Reduces warnings on Windows.

@@ -59,7 +59,9 @@ The Apache License, Version 2.0 (the "License");
#else

// Windows
# define WIN32_LEAN_AND_MEAN
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes

warning C4005: 'WIN32_LEAN_AND_MEAN': macro redefinition

@@ -77,6 +77,9 @@ inline profiler::thread_id_t getCurrentThreadId()
#elif defined(__QNX__)
EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)gettid();
return _id;
#elif defined(__EMSCRIPTEN__)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes error when building with EMSCRIPTEN:

In file included from /easy_profiler_core/thread_storage.cpp:45:
/easy_profiler_core/current_thread.h:81:95: error: use of undeclared identifier '__NR_gettid'
    EASY_THREAD_LOCAL static const profiler::thread_id_t _id = (profiler::thread_id_t)syscall(__NR_gettid);

@@ -91,7 +91,6 @@ namespace profiler {

public:

CSwitchEvent() = default;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes

serialized_block.h:94:9: warning: explicitly defaulted default constructor is implicitly deleted [-Wdefaulted-function-deleted]
        CSwitchEvent() = default;
        ^
serialized_block.h:88:39: note: default constructor of 'CSwitchEvent' is implicitly deleted because base class 'profiler::Event' has a deleted default constructor
    class PROFILER_API CSwitchEvent : public Event
                                      ^
/details/profiler_public_types.h:117:9: note: 'Event' has been explicitly marked deleted here
        Event() = delete;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant