Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dev/kboyarinov/try_…
Browse files Browse the repository at this point in the history
…put_and_wait_rfc
  • Loading branch information
kboyarinov committed Jan 6, 2025
2 parents 8c29592 + 8659619 commit 23f859e
Show file tree
Hide file tree
Showing 154 changed files with 6,068 additions and 1,079 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
7 changes: 3 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Intel Corporation
# Copyright (c) 2023-2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +13,5 @@
# limitations under the License.

allocator:
- 'src/tbbmalloc/**/*'
- 'src/tbbmalloc_proxy/**/*'
- 'test/tbbmalloc/**/*'
- changed-files:
- any-glob-to-any-file: ['src/tbbmalloc/**/*', 'src/tbbmalloc_proxy/**/*', 'test/tbbmalloc/**/*']
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: [ubuntu-20.04]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run scan
run: |
sudo apt update && sudo apt install -y codespell
Expand All @@ -47,7 +47,7 @@ jobs:
runs-on: [ubuntu-20.04]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run scan
run: |
command -v clang-format-10
Expand All @@ -62,7 +62,7 @@ jobs:
runs-on: [ubuntu-22.04]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
pip3 install -U Jinja2
Expand All @@ -75,7 +75,7 @@ jobs:
export BUILD_TYPE=${BUILD_TYPE} && sphinx-build doc html
tar -czvf html.tar.gz html/
- name: Save docs
uses: actions/upload-artifact@v2.2.1
uses: actions/upload-artifact@v4
with:
name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}
path: html.tar.gz
Expand All @@ -90,14 +90,14 @@ jobs:
needs: [documentation]
steps:
- name: Checkout gh-pages
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Set env
run: echo GITHUB_SHA_SHORT=${GITHUB_SHA::8} >> $GITHUB_ENV
- name: Download documetation
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}
- name: Publish to github pages
Expand All @@ -117,7 +117,7 @@ jobs:
if: ${{ github.ref != 'refs/heads/master' }}
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run check
Expand All @@ -137,7 +137,7 @@ jobs:
runs-on: [ubuntu-latest]
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
run: |
mkdir build && cd build
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
preview: 'ON'
cmake_static: -DBUILD_SHARED_LIBS=OFF
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
shell: bash
run: |
Expand All @@ -198,7 +198,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-12
- os: macos-14
c_compiler: clang
cxx_compiler: clang++
std: 14
Expand All @@ -212,7 +212,7 @@ jobs:
preview: 'ON'
cmake_static: -DBUILD_SHARED_LIBS=OFF
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
shell: bash
run: |
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
preview: 'OFF'
job_name: windows_cl2022_cxx17_relwithdebinfo_preview=OFF
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
run: |
mkdir build
Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
build_type: debug
preview: 'ON'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
shell: bash
run: |
Expand All @@ -314,14 +314,14 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-12
- os: macos-15
c_compiler: clang
cxx_compiler: clang++
std: 14
build_type: relwithdebinfo
preview: 'ON'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
shell: bash
run: |
Expand Down Expand Up @@ -357,7 +357,7 @@ jobs:
preview: 'OFF'
job_name: examples_windows_cl2022_cxx17_relwithdebinfo_preview=OFF
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run testing
run: |
mkdir build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@v2.6.1
uses: step-security/harden-runner@v2.10.2
with:
egress-policy: audit

Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Coverity Scan

on:

# Only run on push to master branch
push:
branches: [master]

permissions: read-all

env:
BUILD_CONCURRENCY: 4
COVERITY_PROJECT: oneapi-src%2FoneTBB

jobs:
coverity_linux:
name: Coverity Linux
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Download Linux 64 Coverity Tool
run: |
curl https://scan.coverity.com/download/cxx/linux64 --output ${GITHUB_WORKSPACE}/cov-linux64-tool.tar.gz \
--data "token=${{secrets.COVERITY_TOKEN}}&project=${{env.COVERITY_PROJECT}}"
mkdir cov-linux64-tool
tar -xzf cov-linux64-tool.tar.gz --strip 1 -C cov-linux64-tool
- name: Build with cov-build
run: |
export PATH="${PWD}/cov-linux64-tool/bin:${PATH}"
mkdir build && cd build
cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=relwithdebinfo \
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DTBB_CPF=ON ..
cov-build --dir cov-int make VERBOSE=1 -j${{env.BUILD_CONCURRENCY}}
- name: Archive Coverity build results
run: |
cd build
tar -czvf cov-int.tgz cov-int
- name: Submit Coverity results for analysis
run: |
cd build
curl \
--form token="${{ secrets.COVERITY_TOKEN }}" \
--form email="${{ secrets.COVERITY_EMAIL }}" \
--form [email protected] \
--form version="${GITHUB_SHA}" \
--form description="" \
"https://scan.coverity.com/builds?project=${{env.COVERITY_PROJECT}}"
3 changes: 1 addition & 2 deletions .github/workflows/issue_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ jobs:
issues: write
contents: read
steps:
- uses: github/issue-labeler@v3.2 #May not be the latest version
- uses: github/issue-labeler@v3.4 #May not be the latest version
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/issue_labeler.yml
enable-versioned-regex: 0
sync-labels: 1
6 changes: 4 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4

- uses: actions/checkout@v4
- uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yml
2 changes: 1 addition & 1 deletion .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@v2.3.1
uses: ossf/scorecard-action@v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand Down
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ cc_library(
]),
copts = ["-w"] + select({
"@platforms//os:windows": [""],
"@platforms//cpu:arm64": [""],
"//conditions:default": ["-mwaitpkg"],
}),
defines =
Expand Down
2 changes: 1 addition & 1 deletion Bazel.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ load("@platforms//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "oneTBB",
branch = "master",
remote = "https://github.com/oneapi-src/oneTBB/",
remote = "https://github.com/uxlfoundation/oneTBB/",
)
```

Expand Down
28 changes: 27 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ cmake_minimum_required(VERSION 3.5)

# Enable CMake policies

if (POLICY CMP0063)
# The NEW behavior for this policy is to honor the visibility properties for all target types.
cmake_policy(SET CMP0063 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
endif()

if (POLICY CMP0068)
# RPATH settings do not affect install_name on macOS since CMake 3.9
cmake_policy(SET CMP0068 NEW)
Expand Down Expand Up @@ -49,7 +55,7 @@ string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_min
string(REGEX REPLACE ".*#define TBB_VERSION_PATCH ([0-9]+).*" "\\1" _tbb_ver_patch "${_tbb_version_info}")
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_version_info}")
string(REGEX REPLACE ".*#define __TBB_BINARY_VERSION ([0-9]+).*" "\\1" TBB_BINARY_VERSION "${_tbb_version_info}")
set(TBB_BINARY_MINOR_VERSION ${_tbb_ver_minor})
string(REGEX REPLACE "..(..)." "\\1" TBB_BINARY_MINOR_VERSION "${TBB_INTERFACE_VERSION}")
set(TBBMALLOC_BINARY_VERSION 2)
set(TBBBIND_BINARY_VERSION 3)

Expand Down Expand Up @@ -84,6 +90,11 @@ endif()

set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++... instead of -std=gnu++...
# ---------------------------------------------------------------------------------------------------------
# Setup symbol visibility properties.

set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
# ---------------------------------------------------------------------------------------------------------

# Detect architecture (bitness).
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
Expand All @@ -105,8 +116,13 @@ option(TBB_CPF "Enable preview features of the library" OFF)
option(TBB_FIND_PACKAGE "Enable search for external oneTBB using find_package instead of build from sources" OFF)
option(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH "Disable HWLOC automatic search by pkg-config tool" ${CMAKE_CROSSCOMPILING})
option(TBB_ENABLE_IPO "Enable Interprocedural Optimization (IPO) during the compilation" ON)
option(TBB_CONTROL_FLOW_GUARD "Enable Control Flow Guard (CFG) during the compilation" OFF)
option(TBB_FUZZ_TESTING "Enable fuzz testing" OFF)
option(TBB_INSTALL "Enable installation" ON)
option(TBB_FILE_TRIM "Enable __FILE__ trim" ON)
if(LINUX)
option(TBB_LINUX_SEPARATE_DBG "Enable separation of the debug symbols during the build" OFF)
endif()
if(APPLE)
option(TBB_BUILD_APPLE_FRAMEWORKS "Build as Apple Frameworks" OFF)
endif()
Expand Down Expand Up @@ -226,6 +242,16 @@ if (TBB_ENABLE_IPO AND BUILD_SHARED_LIBS AND NOT ANDROID_PLATFORM AND NOT TBB_SA
endif()
endif()

if (TBB_FILE_TRIM)
file(RELATIVE_PATH TBB_RELATIVE_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} NATIVE_TBB_PROJECT_ROOT_DIR)
file(TO_NATIVE_PATH ${TBB_RELATIVE_BIN_PATH} NATIVE_TBB_RELATIVE_BIN_PATH)
endif ()

if (TBB_CONTROL_FLOW_GUARD)
message(STATUS "Control Flow Guard (CFG) enabled")
endif()

set(TBB_COMPILER_SETTINGS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compilers/${CMAKE_CXX_COMPILER_ID}.cmake)
if (EXISTS ${TBB_COMPILER_SETTINGS_FILE})
include(${TBB_COMPILER_SETTINGS_FILE})
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ As an open source project, we welcome community contributions to oneAPI Threadin

## Licensing

Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. The oneTBB project uses the [Apache 2.0 License](https://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt), a permissive open source license that allows you to freely use, modify, and distribute your own products that include Apache 2.0 licensed software. By contributing to the oneTBB project, you agree to the license and copyright terms therein and release your own contributions under these terms.
Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. The oneTBB project uses the [Apache 2.0 License](https://github.com/uxlfoundation/oneTBB/blob/master/LICENSE.txt), a permissive open source license that allows you to freely use, modify, and distribute your own products that include Apache 2.0 licensed software. By contributing to the oneTBB project, you agree to the license and copyright terms therein and release your own contributions under these terms.

Some imported or reused components within oneTBB use other licenses, as described in [third-party-programs.txt](https://github.com/oneapi-src/oneTBB/blob/master/third-party-programs.txt). By carefully reviewing potential contributions, we can ensure that the community can develop products with oneTBB without concerns over patent or copyright issues.
Some imported or reused components within oneTBB use other licenses, as described in [third-party-programs.txt](https://github.com/uxlfoundation/oneTBB/blob/master/third-party-programs.txt). By carefully reviewing potential contributions, we can ensure that the community can develop products with oneTBB without concerns over patent or copyright issues.

## Prerequisites

As a contributor, youll want to be familiar with the oneTBB project and the repository layout. You should also know how to use it as explained in the [oneTBB documentation](https://oneapi-src.github.io/oneTBB/) and how to set up your build development environment to configure, build, and test oneTBB as explained in the [oneTBB Build System Description](cmake/README.md).
As a contributor, you'll want to be familiar with the oneTBB project and the repository layout. You should also know how to use it as explained in the [oneTBB documentation](https://uxlfoundation.github.io/oneTBB/) and how to set up your build development environment to configure, build, and test oneTBB as explained in the [oneTBB Build System Description](cmake/README.md).

## Pull Requests

You can find all [open oneTBB pull requests](https://github.com/oneapi-src/oneTBB/pulls) on GitHub.
You can find all [open oneTBB pull requests](https://github.com/uxlfoundation/oneTBB/pulls) on GitHub.

### Before contributing changes directly to the oneTBB repository

Expand Down
6 changes: 3 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ You can use the ``install`` components for partial installation.
The following install components are supported:
- `runtime` - oneTBB runtime package (core shared libraries and `.dll` files on Windows* OS).
- `devel` - oneTBB development package (header files, CMake integration files, library symbolic links, and `.lib` files on Windows* OS).
- `tbb4py` - [oneTBB Module for Python](https://github.com/oneapi-src/oneTBB/blob/master/python/README.md).
- `tbb4py` - [oneTBB Module for Python](https://github.com/uxlfoundation/oneTBB/blob/master/python/README.md).

If you want to install specific components after configuration and build, run:

Expand Down Expand Up @@ -99,7 +99,7 @@ The following example demonstrates how to install oneTBB for single-configuratio
# Do our experiments in /tmp
cd /tmp
# Clone oneTBB repository
git clone https://github.com/oneapi-src/oneTBB.git
git clone https://github.com/uxlfoundation/oneTBB.git
cd oneTBB
# Create binary directory for out-of-source build
mkdir build && cd build
Expand All @@ -121,7 +121,7 @@ Choose the configuration during the build and install steps:
REM Do our experiments in %TMP%
cd %TMP%
REM Clone oneTBB repository
git clone https://github.com/oneapi-src/oneTBB.git
git clone https://github.com/uxlfoundation/oneTBB.git
cd oneTBB
REM Create binary directory for out-of-source build
mkdir build && cd build
Expand Down
Loading

0 comments on commit 23f859e

Please sign in to comment.