-
-
Notifications
You must be signed in to change notification settings - Fork 542
Feat/local convenience header #7070
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
Open
shivansh023023
wants to merge
12
commits into
TheHPXProject:master
Choose a base branch
from
shivansh023023:feat/local-convenience-header
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3960bd9
build: add compile-time linker wrap check for Linux static builds
shivansh023023 f858d7d
fix: resolve circular deps, header test, and inspect CI failures
shivansh023023 cc320c6
Apply suggestion from @hkaiser
hkaiser 8abde61
fix: resolve circular dependencies and header consistency in local.hpp
87796df
fix: resolve distributed tests compilation failures by correcting pre…
9659fb2
fix(include_local): remove automatic hpx_main.hpp inclusion from loca…
9fc4936
fix: use core-only init header in local_header test
30ab3ec
fix: use default HPX linking for local_header test
02a6048
fix: cmake-format and clang-format compliance
b8276c3
fix: simplify local_header test to avoid wrap_main linking conflict
53e40b0
Apply Hartmut's feedback: Remove arbitrary local.hpp, fix static link…
ff467c1
Fix Windows CI: Restore windows-2022 to match upstream/master and rem…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
31 changes: 31 additions & 0 deletions
31
libs/core/config/include/hpx/config/static_linker_check.hpp
This file contains hidden or 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 @@ | ||
| // Copyright (c) 2020-2026 The STE||AR-Group | ||
| // | ||
| // SPDX-License-Identifier: BSL-1.0 | ||
| // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
|
||
| /// \file hpx/config/static_linker_check.hpp | ||
| /// \brief Compile-time safety check for the -Wl,-wrap=main linker flag. | ||
| /// | ||
| /// On Linux, when HPX is statically linked with dynamic main wrapping | ||
| /// enabled, the linker requires -Wl,-wrap=main to intercept main() and | ||
| /// bootstrap the HPX runtime. Without it, programs crash at startup. | ||
| /// | ||
| /// This header emits a #warning when those conditions are detected and | ||
| /// the HPX_HAVE_WRAP_MAIN_CONFIGURED define is absent. CMake consumers | ||
| /// get the define injected automatically via the hpx_wrap target's | ||
| /// INTERFACE compile definitions, so they never see this warning. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <hpx/config/defines.hpp> | ||
|
|
||
| #if defined(__linux__) && defined(HPX_HAVE_DYNAMIC_HPX_MAIN) && \ | ||
| defined(HPX_HAVE_STATIC_LINKING) && \ | ||
| !defined(HPX_HAVE_WRAP_MAIN_CONFIGURED) | ||
| // clang-format off | ||
| #warning \ | ||
| "HPX: -Wl,-wrap=main not detected. " \ | ||
| "Link via HPX::wrap_main or add flag manually." | ||
| // clang-format on | ||
| #endif |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,26 @@ | ||
| # Copyright (c) 2020-2021 The STE||AR-Group | ||
| # Copyright (c) 2020-2026 The STE||AR-Group | ||
| # | ||
| # SPDX-License-Identifier: BSL-1.0 | ||
| # Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
|
||
| set(tests local_header) | ||
|
|
||
| set(local_header_FLAGS NOLIBS DEPENDENCIES hpx_core) | ||
|
|
||
| foreach(test ${tests}) | ||
| set(sources ${test}.cpp) | ||
|
|
||
| source_group("Source Files" FILES ${sources}) | ||
|
|
||
| set(folder_name "Tests/Unit/Modules/Core/IncludeLocal") | ||
|
|
||
| add_hpx_executable( | ||
| ${test}_test INTERNAL_FLAGS | ||
| SOURCES ${sources} ${${test}_FLAGS} | ||
| EXCLUDE_FROM_ALL | ||
| FOLDER ${folder_name} | ||
| ) | ||
|
|
||
| add_hpx_unit_test("modules.include_local" ${test} ${${test}_PARAMETERS}) | ||
| endforeach() |
This file contains hidden or 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,21 @@ | ||
| // Copyright (c) 2020-2026 The STE||AR-Group | ||
| // | ||
| // SPDX-License-Identifier: BSL-1.0 | ||
| // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
|
||
| // Verify that the local headers are self-contained and provide access to the | ||
| // Standard Parallel Toolkit types: parallel algorithms, numeric algorithms, | ||
| // execution policies, and futures. | ||
| // | ||
| // This is a compile-and-link sanity check only. It does NOT start the HPX | ||
| // runtime, so it has no dependency on the wrap module (hpx_main.hpp) or on | ||
| // any specific HPX link target beyond hpx_core. | ||
|
|
||
| #include <hpx/execution.hpp> | ||
|
|
||
| int main() | ||
| { | ||
| hpx::execution::parallel_policy p; | ||
| return 0; | ||
| } | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will prevent the compilation error reported: