-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/nvidiamonitor: fix methods not exported in the symbol table (#6)
NVidiaMonitor symbols were not exported when cppuprofile was compiled as a shared library on Linux due to -fvisibility=hidden option. Let's fix this by exporting the public NvidiaMonitor methods.
- Loading branch information
Showing
3 changed files
with
39 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Software Name : cppuprofile | ||
// SPDX-FileCopyrightText: Copyright (c) 2023 Orange | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// | ||
// This software is distributed under the BSD License; | ||
// see the LICENSE file for more details. | ||
// | ||
// Author: Cédric CHEDALEUX <[email protected]> et al. | ||
|
||
#pragma once | ||
|
||
// UPROFAPI is used to export public API functions from the DLL / shared library. | ||
#if defined(_UPROFILE_BUILD_SHARED) | ||
#if defined(_WIN32) | ||
/* Build as a Win32 DLL */ | ||
#define UPROFAPI __declspec(dllexport) | ||
#elif defined(__linux__) | ||
/* Build as a shared library */ | ||
#define UPROFAPI __attribute__((visibility("default"))) | ||
#endif // if defined(_UPROFILE_BUILD_SHARED) | ||
|
||
#elif defined(UPROFILE_DLL) | ||
#if defined(_WIN32) | ||
/* Call uprofile as a Win32 DLL */ | ||
#define UPROFAPI __declspec(dllimport) | ||
#endif // if defined(_WIN32) | ||
#endif // if defined(UPROFILE_DLL) | ||
|
||
#if !defined(UPROFAPI) | ||
#define UPROFAPI | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters