Skip to content

Commit 585da50

Browse files
authored
[third-party] Add a snapshot of Boost.Math 1.89 standalone (#141508)
This PR adds the code of Boost.Math as of version 1.89 into the third-party directory, as discussed in a recent RFC [1]. The goal is for this code to be used as a back-end for the C++17 Math Special Functions. As explained in third-paty/README.md, this code is cleared for usage inside libc++ for the Math Special functions, however the LLVM Foundation should be consulted before using this code anywhere else in the LLVM project, due to the fact that it is under the Boost Software License (as opposed to the usual LLVM license). See the RFC [1] for more details. [1]: https://discourse.llvm.org/t/rfc-libc-taking-a-dependency-on-boost-math-for-the-c-17-math-special-functions
1 parent 7d1538c commit 585da50

File tree

517 files changed

+184283
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

517 files changed

+184283
-0
lines changed

third-party/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Third-party LLVM dependencies
2+
3+
This directory contains third-party dependencies used in various components of LLVM.
4+
Integrating a new third-party dependency generally requires it to be licensed under
5+
the Apache-with-LLVM-exception license. For integrating code under other licenses,
6+
please follow the process explained in the [LLVM Developer Policy](https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents).
7+
8+
In particular, due to its non-LLVM license, the Boost.Math third-party dependency
9+
can exclusively be used within the libc++ compiled library as discussed in [this RFC](https://discourse.llvm.org/t/rfc-libc-taking-a-dependency-on-boost-math-for-the-c-17-math-special-functions).
10+
Do not use it in other parts of LLVM without prior discussion with the LLVM Board
11+
(and update this documentation).
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2019 - 2021 Alexander Grund
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
4+
#
5+
# Sample codecov configuration file. Edit as required
6+
7+
codecov:
8+
max_report_age: off
9+
require_ci_to_pass: yes
10+
notify:
11+
# Increase this if you have multiple coverage collection jobs
12+
after_n_builds: 1
13+
wait_for_ci: yes
14+
15+
# Change how pull request comments look
16+
comment:
17+
layout: "reach,diff,flags,files,footer"
18+
19+
# Ignore specific files or folders. Glob patterns are supported.
20+
# See https://docs.codecov.com/docs/ignoring-paths
21+
ignore:
22+
- extra/**/*
23+
- reporting/**/*
24+
- example/**/*
25+
- include_private/**/*
26+
- tools/**/*

third-party/boost-math/.drone.star

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Use, modification, and distribution are
2+
# subject to the Boost Software License, Version 1.0. (See accompanying
3+
# file LICENSE.txt)
4+
#
5+
# Copyright Rene Rivera 2020.
6+
# Copyright John Maddock 2021.
7+
8+
# For Drone CI we use the Starlark scripting language to reduce duplication.
9+
# As the yaml syntax for Drone CI is rather limited.
10+
#
11+
#
12+
globalenv={}
13+
linuxglobalimage="cppalliance/droneubuntu1604:1"
14+
windowsglobalimage="cppalliance/dronevs2019"
15+
16+
def main(ctx):
17+
18+
things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests", "concepts" ]
19+
gcc13_things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests", "concepts", "new_floats" ]
20+
sanitizer_test = [ "special_fun", "distribution_tests", "misc", "interpolators", "quadrature", "float128_tests" ]
21+
gnu_5_stds = [ "gnu++14", "c++14" ]
22+
gnu_6_stds = [ "gnu++14", "c++14", "gnu++17", "c++17" ]
23+
clang_6_stds = [ "c++14", "c++17" ]
24+
gnu_9_stds = [ "gnu++14", "c++14", "gnu++17", "c++17", "gnu++2a", "c++2a" ]
25+
clang_10_stds = [ "c++14", "c++17", "c++2a" ]
26+
gnu_non_native = [ "gnu++17" ]
27+
gcc13_stds = [ "c++23" ]
28+
29+
result = []
30+
31+
for suite in sanitizer_test:
32+
#
33+
# Sanitizers:
34+
#
35+
result.append(linux_cxx("Ubuntu Clang-18 C++20 ASAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=address <linkflags>-fsanitize=address <cxxflags>-DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv))
36+
result.append(linux_cxx("Ubuntu Clang-18 C++20 USAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=undefined <linkflags>-fsanitize=undefined <cxxflags>-DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv))
37+
result.append(linux_cxx("Ubuntu Clang-18 C++20 TSAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=thread <linkflags>-fsanitize=thread <cxxflags>-DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv))
38+
result.append(linux_cxx("Ubuntu Clang-18 C++20 ISAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=integer <linkflags>-fsanitize=integer' }, globalenv=globalenv))
39+
40+
for suite in things_to_test:
41+
for cxx in gnu_5_stds:
42+
result.append(linux_cxx("Ubuntu g++-5 " + cxx + " " + suite, "g++-5", packages="g++-5", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
43+
for cxx in gnu_6_stds:
44+
result.append(linux_cxx("Ubuntu g++-6 " + cxx + " " + suite, "g++-6", packages="g++-6", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
45+
result.append(linux_cxx("Ubuntu g++-7 " + cxx + " " + suite, "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
46+
result.append(linux_cxx("Ubuntu g++-8 " + cxx + " " + suite, "g++-8", packages="g++-8", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
47+
result.append(linux_cxx("Ubuntu g++-9 " + cxx + " " + suite, "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
48+
for cxx in clang_6_stds:
49+
result.append(linux_cxx("Ubuntu clang++-6 " + cxx + " " + suite, "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
50+
result.append(linux_cxx("Ubuntu clang++-7 " + cxx + " " + suite, "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
51+
result.append(linux_cxx("Ubuntu clang++-8 " + cxx + " " + suite, "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
52+
result.append(linux_cxx("Ubuntu clang++-9 " + cxx + " " + suite, "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
53+
for cxx in gnu_9_stds:
54+
result.append(linux_cxx("Ubuntu g++-10 " + cxx + " " + suite, "g++-10", packages="g++-10", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
55+
result.append(linux_cxx("Ubuntu g++-11 " + cxx + " " + suite, "g++-11", packages="g++-11", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-11', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
56+
result.append(linux_cxx("Ubuntu g++-12 " + cxx + " " + suite, "g++-12", packages="g++-12", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-12', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
57+
result.append(linux_cxx("Ubuntu clang++-14 " + cxx + " " + suite, "clang++-14", packages="clang-14", llvm_os="jammy", llvm_ver="14", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-14', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
58+
result.append(linux_cxx("Ubuntu clang++-15 " + cxx + " " + suite, "clang++-15", packages="clang-15", llvm_os="jammy", llvm_ver="15", buildtype="boost", image="cppalliance/droneubuntu2204:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-15', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
59+
for cxx in clang_10_stds:
60+
result.append(linux_cxx("Ubuntu clang++-10 " + cxx + " " + suite, "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
61+
for cxx in gnu_non_native:
62+
result.append(linux_cxx("Ubuntu g++ s390s " + cxx + " " + suite, "g++", packages="g++", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
63+
for cxx in gnu_non_native:
64+
result.append(linux_cxx("Ubuntu g++ ARM64" + cxx + " " + suite, "g++", packages="g++", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
65+
for cxx in gnu_non_native:
66+
result.append(osx_cxx("M1 Clang " + cxx + " " + suite, "clang++", buildscript="drone", buildtype="boost", xcode_version="14.1", environment={'TOOLSET': 'clang', 'CXXSTD': cxx, 'TEST_SUITE': suite, 'DEFINE': 'BOOST_MATH_NO_REAL_CONCEPT_TESTS,BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS,BOOST_MATH_MULTI_ARCH_CI_RUN', }, globalenv=globalenv))
67+
for suite in gcc13_things_to_test:
68+
for cxx in gcc13_stds:
69+
result.append(linux_cxx("Ubuntu g++-13 " + cxx + " " + suite, "g++-13", packages="g++-13", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-13', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
70+
result.append(linux_cxx("Ubuntu g++-14 " + cxx + " " + suite, "g++-14", packages="g++-14", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-14', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
71+
72+
return result
73+
74+
# from https://github.com/boostorg/boost-ci
75+
load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
* text=auto !eol svneol=native#text/plain
2+
*.gitattributes text svneol=native#text/plain
3+
4+
# Scriptish formats
5+
*.bat text svneol=native#text/plain
6+
*.bsh text svneol=native#text/x-beanshell
7+
*.cgi text svneol=native#text/plain
8+
*.cmd text svneol=native#text/plain
9+
*.js text svneol=native#text/javascript
10+
*.php text svneol=native#text/x-php
11+
*.pl text svneol=native#text/x-perl
12+
*.pm text svneol=native#text/x-perl
13+
*.py text svneol=native#text/x-python
14+
*.sh eol=lf svneol=LF#text/x-sh
15+
configure eol=lf svneol=LF#text/x-sh
16+
17+
# Image formats
18+
*.bmp binary svneol=unset#image/bmp
19+
*.gif binary svneol=unset#image/gif
20+
*.ico binary svneol=unset#image/ico
21+
*.jpeg binary svneol=unset#image/jpeg
22+
*.jpg binary svneol=unset#image/jpeg
23+
*.png binary svneol=unset#image/png
24+
*.tif binary svneol=unset#image/tiff
25+
*.tiff binary svneol=unset#image/tiff
26+
*.svg text svneol=native#image/svg%2Bxml
27+
28+
# Data formats
29+
*.pdf binary svneol=unset#application/pdf
30+
*.avi binary svneol=unset#video/avi
31+
*.doc binary svneol=unset#application/msword
32+
*.dsp text svneol=crlf#text/plain
33+
*.dsw text svneol=crlf#text/plain
34+
*.eps binary svneol=unset#application/postscript
35+
*.gz binary svneol=unset#application/gzip
36+
*.mov binary svneol=unset#video/quicktime
37+
*.mp3 binary svneol=unset#audio/mpeg
38+
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
39+
*.ps binary svneol=unset#application/postscript
40+
*.psd binary svneol=unset#application/photoshop
41+
*.rdf binary svneol=unset#text/rdf
42+
*.rss text svneol=unset#text/xml
43+
*.rtf binary svneol=unset#text/rtf
44+
*.sln text svneol=native#text/plain
45+
*.swf binary svneol=unset#application/x-shockwave-flash
46+
*.tgz binary svneol=unset#application/gzip
47+
*.vcproj text svneol=native#text/xml
48+
*.vcxproj text svneol=native#text/xml
49+
*.vsprops text svneol=native#text/xml
50+
*.wav binary svneol=unset#audio/wav
51+
*.xls binary svneol=unset#application/vnd.ms-excel
52+
*.zip binary svneol=unset#application/zip
53+
54+
# Text formats
55+
.htaccess text svneol=native#text/plain
56+
*.bbk text svneol=native#text/xml
57+
*.cmake text svneol=native#text/plain
58+
*.css text svneol=native#text/css
59+
*.dtd text svneol=native#text/xml
60+
*.htm text svneol=native#text/html
61+
*.html text svneol=native#text/html
62+
*.ini text svneol=native#text/plain
63+
*.log text svneol=native#text/plain
64+
*.mak text svneol=native#text/plain
65+
*.qbk text svneol=native#text/plain
66+
*.rst text svneol=native#text/plain
67+
*.sql text svneol=native#text/x-sql
68+
*.txt text svneol=native#text/plain
69+
*.xhtml text svneol=native#text/xhtml%2Bxml
70+
*.xml text svneol=native#text/xml
71+
*.xsd text svneol=native#text/xml
72+
*.xsl text svneol=native#text/xml
73+
*.xslt text svneol=native#text/xml
74+
*.xul text svneol=native#text/xul
75+
*.yml text svneol=native#text/plain
76+
boost-no-inspect text svneol=native#text/plain
77+
CHANGES text svneol=native#text/plain
78+
COPYING text svneol=native#text/plain
79+
INSTALL text svneol=native#text/plain
80+
Jamfile text svneol=native#text/plain
81+
Jamroot text svneol=native#text/plain
82+
Jamfile.v2 text svneol=native#text/plain
83+
Jamrules text svneol=native#text/plain
84+
Makefile* text svneol=native#text/plain
85+
README text svneol=native#text/plain
86+
TODO text svneol=native#text/plain
87+
88+
# Code formats
89+
*.c text svneol=native#text/plain
90+
*.cpp text svneol=native#text/plain
91+
*.h text svneol=native#text/plain
92+
*.hpp text svneol=native#text/plain
93+
*.ipp text svneol=native#text/plain
94+
*.tpp text svneol=native#text/plain
95+
*.jam text svneol=native#text/plain
96+
*.java text svneol=native#text/plain

third-party/boost-math/.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/doc/inspect.htm
2+
/**/*.log
3+
reporting/*/third_party
4+
reporting/*/html
5+
inspect.html
6+
/example/float128_examples.cpp
7+
test/cuda
8+
*.DS_Store
9+
/**/*.dSYM/
10+
**/.temps/*
11+
build/*
12+
.vscode/*
13+
*.svg
14+
tools/bin/**
15+
.idea/*
16+
17+
# CMake Related Options
18+
*.a
19+
*.o
20+
cmake_install.cmake
21+
CMakeCache.txt
22+
Makefile
23+
**/CMakeFiles/**
24+
**CTestTestfile.cmake
25+
DartConfiguration.tcl
26+
cmake-build-debug/*
27+
.cmake/*
28+
build.ninja
29+
.ninja*
30+
a.out

0 commit comments

Comments
 (0)