2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Merge branch 'develop' of https://github.com/boostorg/build into cppbuilder

This commit is contained in:
Edward Diener
2020-05-13 16:41:33 -04:00
39 changed files with 305 additions and 252 deletions

4
.gitattributes vendored
View File

@@ -2,10 +2,10 @@
*.gitattributes text svneol=native#text/plain
# Scriptish formats
*.bat text svneol=crlf#text/plain
*.bat text eol=crlf svneol=crlf#text/plain
*.bsh text svneol=native#text/x-beanshell
*.cgi text svneol=native#text/plain
*.cmd text svneol=native#text/plain
*.cmd text eol=crlf svneol=crlf#text/plain
*.js text svneol=native#text/javascript
*.php text svneol=native#text/x-php
*.pl text svneol=native#text/x-perl

View File

@@ -141,8 +141,8 @@ stages:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
fi
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
sudo -E apt-get -o Acquire::Retries=3 update
sudo -E apt-get -o Acquire::Retries=3 -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
displayName: Install
- bash: |
set -e
@@ -381,8 +381,8 @@ stages:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
fi
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
sudo -E apt-get -o Acquire::Retries=3 update
sudo -E apt-get -o Acquire::Retries=3 -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
displayName: Install
- bash: |
set -e
@@ -438,8 +438,8 @@ stages:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo -E apt-add-repository "deb http://apt.llvm.org/xenial/ ${LLVM_REPO} main"
fi
sudo -E apt-get update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
sudo -E apt-get -o Acquire::Retries=3 update
sudo -E apt-get -o Acquire::Retries=3 -yq --no-install-suggests --no-install-recommends install ${PACKAGES}
displayName: Install
- bash: |
set -e

View File

@@ -1,6 +1,7 @@
# Copyright 2001, 2002, 2003 Dave Abrahams
# Copyright 2006 Rene Rivera
# Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus
# Copyright 2020 Nikita Kniazev
# 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)
@@ -104,28 +105,15 @@ rule evaluate-conditionals-in-context ( properties * : context * )
{
# Have negative checks
local fail ;
while $(condition)
for local c in $(condition)
{
local c = $(condition[1]) ;
local m = [ MATCH ^!(.*) : $(c) ] ;
if $(m)
local c = [ MATCH ^(!)?(.*) : $(c) ] ;
# It is XOR: $(c[1]) = "!" ^ $(c[2]) in $(context)
if $(c[1]) = "!" && $(c[2]) in $(context) || $(c[1]) != "!" && ! ( $(c[2]) in $(context) )
{
local p = $(m:G=$(c:G)) ;
if $(p) in $(context)
{
fail = true ;
c = ;
}
fail = true ;
break ;
}
else
{
if ! $(c) in $(context)
{
fail = true ;
c = ;
}
}
condition = $(condition[2-]) ;
}
if ! $(fail)
{
@@ -574,7 +562,10 @@ rule translate ( properties * : project-id : project-location : context-module )
local e ;
for local c in [ regex.split $(condition) "," ]
{
e += [ feature.expand-subfeatures $(c) : true ] ;
# strip negation for expansion and readd after
c = [ MATCH "^(!)?(.*)" : $(c) ] ;
local expanded = [ feature.expand-subfeatures $(c[2]) : true ] ;
e += $(c[1])$(expanded) ;
}
condition = "$(e:J=,):" ;
@@ -901,11 +892,26 @@ rule __test__ ( )
: refine <toolset>gcc:<define>foo : <toolset>gcc:<define>bar
: $(test-space) ;
assert.result
: evaluate-conditionals-in-context
<variant>release,<rtti>off:<define>MY_RELEASE
: <toolset>gcc <variant>release <rtti>on ;
assert.result <define>MY_RELEASE
: evaluate-conditionals-in-context
<variant>release,<rtti>off:<define>MY_RELEASE
: <toolset>gcc <variant>release <rtti>off ;
assert.result <define>MY_RELEASE
: evaluate-conditionals-in-context
<variant>release,!<rtti>off:<define>MY_RELEASE
: <toolset>gcc <variant>release <rtti>on ;
assert.result
: evaluate-conditionals-in-context
<variant>release,!<rtti>off:<define>MY_RELEASE
: <toolset>gcc <variant>release <rtti>off ;
assert.result debug
: as-path <optimization>off <variant>debug
: $(test-space) ;
@@ -973,5 +979,10 @@ rule __test__ ( )
assert.result-set-equal <toolset>gcc,<toolset-gcc:version>3.0 <define>FOO
: split-conditional <toolset>gcc,<toolset-gcc:version>3.0:<define>FOO ;
# Test translate does not choke on negations in conditional
assert.result <toolset>gcc,!<rtti>off:<define>HELLO
: translate <toolset>gcc,!<rtti>off:<define>HELLO
: project-id : project-location : context-module ;
feature.finish-test property-test-temp ;
}

View File

@@ -33,7 +33,7 @@ call :Call_If_Exists "%B2_TOOLSET_ROOT%bin\VCVARS32.BAT"
if not "_%B2_TOOLSET_ROOT%_" == "__" (
set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
)
set "B2_CXX=%CXX% /nologo /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof
@@ -48,7 +48,7 @@ if NOT "_%B2_TOOLSET_ROOT%_" == "__" (
if "_%VCINSTALLDIR%_" == "__" (
set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
) )
set "B2_CXX=%CXX% /nologo /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof
@@ -67,7 +67,7 @@ if NOT "_%B2_TOOLSET_ROOT%_" == "__" (
if "_%VCINSTALLDIR%_" == "__" (
set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
) )
set "B2_CXX=%CXX% /nologo /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof
@@ -87,7 +87,7 @@ if NOT "_%B2_TOOLSET_ROOT%_" == "__" (
if "_%VCINSTALLDIR%_" == "__" (
set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
) )
set "B2_CXX=%CXX% /nologo /Zi /MT /TP /Feb2 /wd4996 /Ox /GL /EHsc"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof
@@ -109,7 +109,7 @@ REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\So
pushd %CD%
if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS%
popd
set "B2_CXX=%CXX% /nologo /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof
@@ -131,7 +131,7 @@ REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\So
pushd %CD%
if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS%
popd
set "B2_CXX=%CXX% /nologo /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof
@@ -153,7 +153,7 @@ REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\So
pushd %CD%
if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS%
popd
set "B2_CXX=%CXX% /nologo /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
set "_known_=1"
goto :eof

View File

@@ -169,7 +169,8 @@ void exec_cmd
/* Open tempfile. */
if ( !( f = fopen( commandbuf + 1, "w" ) ) )
{
printf( "can't open cmd_string file\n" );
err_printf( "[errno %d] failed to wite cmd_string file '%s': %s",
errno, commandbuf + 1, strerror(errno) );
rstat = EXEC_CMD_FAIL;
exit_reason = EXIT_FAIL;

View File

@@ -24,6 +24,7 @@
#include "output.h"
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -5017,8 +5018,8 @@ LIST * function_run( FUNCTION * function_, FRAME * frame, STACK * s )
if ( !out_file )
{
err_printf( "failed to write output file '%s'!\n",
out_name->value );
err_printf( "[errno %d] failed to write output file '%s': %s",
errno, out_name->value, strerror(errno) );
exit( EXITBAD );
}
string_free( out_name );

View File

@@ -45,6 +45,9 @@
#include "variable.h"
#include "output.h"
#include <errno.h>
#include <string.h>
typedef struct hcachedata HCACHEDATA ;
struct hcachedata
@@ -192,7 +195,12 @@ void hcache_init()
return;
if ( !( f = fopen( hcachename, "rb" ) ) )
{
if ( errno != ENOENT )
err_printf( "[errno %d] failed to read hcache file '%s': %s",
errno, hcachename, strerror(errno) );
return;
}
version = read_netstring( f );
@@ -359,7 +367,11 @@ void hcache_done()
goto cleanup;
if ( !( f = fopen( hcachename, "wb" ) ) )
{
err_printf( "[errno %d] failed to write hcache file '%s': %s",
errno, hcachename, strerror(errno) );
goto cleanup;
}
maxage = cache_maxage();

View File

@@ -41,6 +41,8 @@
#include "variable.h"
#include "output.h"
#include <errno.h>
#include <string.h>
/* this type is used to store a dictionary of file header macros */
typedef struct header_macro
@@ -81,7 +83,11 @@ void macro_headers( TARGET * t )
}
if ( !( f = fopen( object_str( t->boundname ), "r" ) ) )
{
err_printf( "[errno %d] failed to scan include file '%s': %s",
errno, object_str( t->boundname ), strerror(errno) );
return;
}
while ( fgets( buf, sizeof( buf ), f ) )
{

View File

@@ -41,6 +41,9 @@
# include "hcache.h"
#endif
#include <errno.h>
#include <string.h>
#ifndef OPT_HEADER_CACHE_EXT
static LIST * headers1( LIST *, OBJECT * file, int rec, regexp * re[] );
#endif
@@ -145,7 +148,13 @@ LIST * headers1( LIST * l, OBJECT * file, int rec, regexp * re[] )
}
if ( !( f = fopen( object_str( file ), "r" ) ) )
{
/* No source files will be generated when -n flag is passed */
if ( !globs.noexec || errno != ENOENT )
err_printf( "[errno %d] failed to scan file '%s': %s",
errno, object_str( file ), strerror(errno) );
return l;
}
while ( fgets( buf, sizeof( buf ), f ) )
{

View File

@@ -136,6 +136,9 @@
#include "execcmd.h"
#include "sysinfo.h"
#include <errno.h>
#include <string.h>
/* Macintosh is "special" */
#ifdef OS_MAC
# include <QuickDraw.h>
@@ -462,7 +465,8 @@ int main( int argc, char * * argv, char * * arg_environ )
{
if ( !( globs.out = fopen( s, "w" ) ) )
{
err_printf( "Failed to write to '%s'\n", s );
err_printf( "[errno %d] failed to write output file '%s': %s",
errno, s, strerror(errno) );
exit( EXITBAD );
}
/* ++globs.noexec; */

View File

@@ -1,4 +1,4 @@
/* A Bison parser, made by GNU Bison 3.5.2. */
/* A Bison parser, made by GNU Bison 3.5.4. */
/* Bison implementation for Yacc-like parsers in C
@@ -48,7 +48,7 @@
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "3.5.2"
#define YYBISON_VERSION "3.5.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"

View File

@@ -1,4 +1,4 @@
/* A Bison parser, made by GNU Bison 3.5.2. */
/* A Bison parser, made by GNU Bison 3.5.4. */
/* Bison interface for Yacc-like parsers in C

View File

@@ -6,6 +6,7 @@
/* This file is ALSO:
* Copyright 2001-2004 David Abrahams.
* Copyright 2020 Nikita Kniazev.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or
* http://www.boost.org/LICENSE_1_0.txt)
@@ -226,5 +227,5 @@ void timestamp_done()
*/
double timestamp_delta_seconds( timestamp const * const a , timestamp const * const b )
{
return ((b->secs*1000000.0+b->nsecs)-(a->secs*1000000.0+a->nsecs))/1000000.0;
return difftime(b->secs, a->secs) + (b->nsecs - a->nsecs) * 1.0E-9;
}

View File

@@ -1,12 +1,14 @@
/* Copyright 2002 Rene Rivera.
/* Copyright 2002, 2020 Rene Rivera.
** Distributed under the Boost Software License, Version 1.0.
** (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cctype>
#include <set>
#include <cstring>
/*
# yyacc - yacc wrapper
@@ -33,18 +35,68 @@
# reversed order of args to be compatible with GenFile rule
# 11-20-2002
# Reimplemented as a C program for portability. (Rene Rivera)
# 05-xx-2020
# Reimplement yet again, in C++. (Rene Rivera)
*/
void print_usage();
char * copy_string(char * s, int l);
char * tokenize_string(char * s);
int cmp_literal(const void * a, const void * b);
static const std::string usage[] = {
"yyacc <grammar output.y> <token table output.h> <grammar source.yy>"
};
typedef struct
void print_usage()
{
char * string;
char * token;
} literal;
for (auto u: usage)
{
std::printf("%s\n", u.c_str());
}
}
std::string tokenize_string(std::string s)
{
std::string result = s;
if (s == ":") result = "_colon";
else if (s == "!") result = "_bang";
else if (s == "!=") result = "_bang_equals";
else if (s == "&&") result = "_amperamper";
else if (s == "&") result = "_amper";
else if (s == "+") result = "_plus";
else if (s == "+=") result = "_plus_equals";
else if (s == "||") result = "_barbar";
else if (s == "|") result = "_bar";
else if (s == ";") result = "_semic";
else if (s == "-") result = "_minus";
else if (s == "<") result = "_langle";
else if (s == "<=") result = "_langle_equals";
else if (s == ">") result = "_rangle";
else if (s == ">=") result = "_rangle_equals";
else if (s == ".") result = "_period";
else if (s == "?") result = "_question";
else if (s == "?=") result = "_question_equals";
else if (s == "=") result = "_equals";
else if (s == ",") result = "_comma";
else if (s == "[") result = "_lbracket";
else if (s == "]") result = "_rbracket";
else if (s == "{") result = "_lbrace";
else if (s == "}") result = "_rbrace";
else if (s == "(") result = "_lparen";
else if (s == ")") result = "_rparen";
std::transform(
result.begin(), result.end(), result.begin(),
[](unsigned char c){ return std::toupper(c); });
return result+"_t";
}
struct literal
{
std::string string;
std::string token;
bool operator<(const literal & x) const
{
return this->string < x.string;
}
};
int main(int argc, char ** argv)
{
@@ -64,8 +116,7 @@ int main(int argc, char ** argv)
if (grammar_source_f == 0) { result = 1; }
if (result == 0)
{
literal literals[1024];
int t = 0;
std::set<literal> literals;
char l[2048];
while (1)
{
@@ -74,15 +125,14 @@ int main(int argc, char ** argv)
char * c = l;
while (1)
{
char * c1 = strchr(c,'`');
char * c1 = std::strchr(c,'`');
if (c1 != 0)
{
char * c2 = strchr(c1+1,'`');
char * c2 = std::strchr(c1+1,'`');
if (c2 != 0)
{
literals[t].string = copy_string(c1+1,c2-c1-1);
literals[t].token = tokenize_string(literals[t].string);
t += 1;
auto l = std::string(c1+1,c2-c1-1);
literals.insert({ l, tokenize_string(l) });
c = c2+1;
}
else
@@ -97,48 +147,25 @@ int main(int argc, char ** argv)
break;
}
}
literals[t].string = 0;
literals[t].token = 0;
qsort(literals,t,sizeof(literal),cmp_literal);
{
int p = 1;
int i = 1;
while (literals[i].string != 0)
{
if (strcmp(literals[p-1].string,literals[i].string) != 0)
{
literals[p] = literals[i];
p += 1;
}
i += 1;
}
literals[p].string = 0;
literals[p].token = 0;
t = p;
}
token_output_f = fopen(argv[2],"w");
token_output_f = std::fopen(argv[2],"w");
if (token_output_f != 0)
{
int i = 0;
while (literals[i].string != 0)
for (const literal & l: literals)
{
fprintf(token_output_f," { \"%s\", %s },\n",literals[i].string,literals[i].token);
i += 1;
std::fprintf(token_output_f," { \"%s\", %s },\n",l.string.c_str(), l.token.c_str());
}
fclose(token_output_f);
std::fclose(token_output_f);
}
else
result = 1;
if (result == 0)
{
grammar_output_f = fopen(argv[1],"w");
grammar_output_f = std::fopen(argv[1],"w");
if (grammar_output_f != 0)
{
int i = 0;
while (literals[i].string != 0)
for (const literal & l: literals)
{
fprintf(grammar_output_f,"%%token %s\n",literals[i].token);
i += 1;
fprintf(grammar_output_f,"%%token %s\n",l.token.c_str());
}
rewind(grammar_source_f);
while (1)
@@ -154,25 +181,20 @@ int main(int argc, char ** argv)
char * c2 = strchr(c1+1,'`');
if (c2 != 0)
{
literal key;
literal * replacement = 0;
key.string = copy_string(c1+1,c2-c1-1);
key.token = 0;
replacement = (literal*)bsearch(
&key,literals,t,sizeof(literal),cmp_literal);
auto replacement = literals.find({std::string(c1+1,c2-c1-1), ""});
*c1 = 0;
fprintf(grammar_output_f,"%s%s",c,replacement->token);
std::fprintf(grammar_output_f,"%s%s",c,replacement->token.c_str());
c = c2+1;
}
else
{
fprintf(grammar_output_f,"%s",c);
std::fprintf(grammar_output_f,"%s",c);
break;
}
}
else
{
fprintf(grammar_output_f,"%s",c);
std::fprintf(grammar_output_f,"%s",c);
break;
}
}
@@ -182,7 +204,7 @@ int main(int argc, char ** argv)
break;
}
}
fclose(grammar_output_f);
std::fclose(grammar_output_f);
}
else
result = 1;
@@ -195,74 +217,3 @@ int main(int argc, char ** argv)
}
return result;
}
static const char * usage[] = {
"yyacc <grammar output.y> <token table output.h> <grammar source.yy>",
0 };
void print_usage()
{
const char ** u;
for (u = usage; *u != 0; ++u)
{
fputs(*u,stderr); putc('\n',stderr);
}
}
char * copy_string(char * s, int l)
{
char * result = (char*)malloc(l+1);
strncpy(result,s,l);
result[l] = 0;
return result;
}
char * tokenize_string(char * s)
{
char * result;
const char * literal = s;
int l;
int c;
if (strcmp(s,":") == 0) literal = "_colon";
else if (strcmp(s,"!") == 0) literal = "_bang";
else if (strcmp(s,"!=") == 0) literal = "_bang_equals";
else if (strcmp(s,"&&") == 0) literal = "_amperamper";
else if (strcmp(s,"&") == 0) literal = "_amper";
else if (strcmp(s,"+") == 0) literal = "_plus";
else if (strcmp(s,"+=") == 0) literal = "_plus_equals";
else if (strcmp(s,"||") == 0) literal = "_barbar";
else if (strcmp(s,"|") == 0) literal = "_bar";
else if (strcmp(s,";") == 0) literal = "_semic";
else if (strcmp(s,"-") == 0) literal = "_minus";
else if (strcmp(s,"<") == 0) literal = "_langle";
else if (strcmp(s,"<=") == 0) literal = "_langle_equals";
else if (strcmp(s,">") == 0) literal = "_rangle";
else if (strcmp(s,">=") == 0) literal = "_rangle_equals";
else if (strcmp(s,".") == 0) literal = "_period";
else if (strcmp(s,"?") == 0) literal = "_question";
else if (strcmp(s,"?=") == 0) literal = "_question_equals";
else if (strcmp(s,"=") == 0) literal = "_equals";
else if (strcmp(s,",") == 0) literal = "_comma";
else if (strcmp(s,"[") == 0) literal = "_lbracket";
else if (strcmp(s,"]") == 0) literal = "_rbracket";
else if (strcmp(s,"{") == 0) literal = "_lbrace";
else if (strcmp(s,"}") == 0) literal = "_rbrace";
else if (strcmp(s,"(") == 0) literal = "_lparen";
else if (strcmp(s,")") == 0) literal = "_rparen";
l = strlen(literal)+2;
result = (char*)malloc(l+1);
for (c = 0; literal[c] != 0; ++c)
{
result[c] = toupper(literal[c]);
}
result[l-2] = '_';
result[l-1] = 't';
result[l] = 0;
return result;
}
int cmp_literal(const void * a, const void * b)
{
return strcmp(((const literal *)a)->string,((const literal *)b)->string);
}

View File

@@ -190,6 +190,8 @@ else
flags borland.compile OPTIONS <warnings>off : -w- ;
flags borland.compile OPTIONS <warnings>all : -w ;
flags borland.compile OPTIONS <warnings>extra : -w ;
flags borland.compile OPTIONS <warnings>pedantic : -w ;
flags borland.compile OPTIONS <warnings-as-errors>on : -w! ;
flags borland OPTIONS <user-interface>gui : -tW ;

View File

@@ -270,8 +270,8 @@ def register_globals ():
# Advanced RISC Machines
'arm',
# z Systems (aka s390x)
's390x',
# z Systems (aka s390x)
's390x',
# Combined architectures for platforms/toolsets that support building for
# multiple architectures at once. "combined" would be the default multi-arch
@@ -287,9 +287,14 @@ def register_globals ():
'native', 'i486', 'i586', 'i686', 'pentium', 'pentium-mmx', 'pentiumpro', 'pentium2', 'pentium3',
'pentium3m', 'pentium-m', 'pentium4', 'pentium4m', 'prescott', 'nocona', 'core2', 'corei7', 'corei7-avx', 'core-avx-i',
'conroe', 'conroe-xe', 'conroe-l', 'allendale', 'merom', 'merom-xe', 'kentsfield', 'kentsfield-xe', 'penryn', 'wolfdale',
'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell', 'k6', 'k6-2', 'k6-3', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp',
'athlon-mp', 'k8', 'opteron', 'athlon64', 'athlon-fx', 'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona',
'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2', 'winchip-c6', 'winchip2', 'c3', 'c3-2', 'atom',
'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell', 'broadwell', 'skylake', 'skylake-avx512', 'cannonlake',
'icelake-client', 'icelake-server', 'cascadelake', 'cooperlake', 'tigerlake',
'atom',
'k6', 'k6-2', 'k6-3', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp', 'athlon-mp', 'k8', 'opteron', 'athlon64', 'athlon-fx',
'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona', 'bdver1', 'bdver2', 'bdver3', 'btver1',
'btver2', 'znver1', 'znver2',
'winchip-c6', 'winchip2',
'c3', 'c3-2', 'c7',
# ia64
'itanium', 'itanium1', 'merced', 'itanium2', 'mckinley',
@@ -320,8 +325,8 @@ def register_globals ():
'armv2', 'armv2a', 'armv3', 'armv3m', 'armv4', 'armv4t', 'armv5',
'armv5t', 'armv5te', 'armv6', 'armv6j', 'iwmmxt', 'ep9312',
# z Systems (aka s390x)
'z196', 'zEC12', 'z13', 'z13', 'z14', 'z15'],
# z Systems (aka s390x)
'z196', 'zEC12', 'z13', 'z13', 'z14', 'z15'],
['propagated', 'optional'])

View File

@@ -171,11 +171,12 @@ rule init ( version ? : command * : options * )
toolset.flags clang-win.compile .CC $(cond) : $(compiler) -m$(addr) ;
toolset.flags clang-win.link .LD $(cond) : $(compiler) -m$(addr) /link "/incremental:no" "/manifest" ;
toolset.flags clang-win.compile .ASM $(cond) : $(assembler) -nologo ;
toolset.flags clang-win.compile .ASM $(cond) : $(assembler) -nologo -c -Zp4 -Cp -Cx ;
toolset.flags clang-win.compile .ASM_OUTPUT $(cond) : -Fo ;
toolset.flags clang-win.archive .LD $(cond) : $(archiver) /nologo ;
toolset.flags clang-win.link .MT $(cond) : $(manifest-tool) -nologo ;
toolset.flags clang-win.compile .MC $(cond) : $(mc-compiler) ;
toolset.flags clang-win.compile .RC $(cond) : $(resource-compiler) /nologo ;
toolset.flags clang-win.compile .RC $(cond) : $(resource-compiler) ;
toolset.flags clang-win.compile .IDL $(cond) : $(idl-compiler) ;
}

View File

@@ -55,7 +55,10 @@ rule init-cxxstd-flags ( toolset : condition * : version )
local dialects = [ feature.values <cxxstd-dialect> ] ;
dialects = [ set.difference $(dialects) : gnu iso ] ;
local std ;
if [ version-ge $(version) : 3.5 ] { std = 1z ; }
if [ version-ge $(version) : 10.0 ] { std = 20 ; }
else if [ version-ge $(version) : 6.0 ] { std = 2a ; }
else if [ version-ge $(version) : 5.0 ] { std = 17 ; }
else if [ version-ge $(version) : 3.5 ] { std = 1z ; }
else if [ version-ge $(version) : 3.4 ] { std = 14 ; }
else if [ version-ge $(version) : 3.3 ] { std = 11 ; }
else { std = 03 ; }

View File

@@ -707,7 +707,7 @@ rule set-cxxstd-procedure ( targets * : sources * : properties * )
local cxxstd = [ feature.get-values cxxstd : $(properties) ] ;
local cray-cxxstd = ;
local unsupported-values = 2a ; # I don't know what '2a' means.
local unsupported-values = 2a 20 ; # I don't know what '2a' means.
if $(cxxstd) && $(cxxstd) in $(unsupported-values)
{

View File

@@ -225,6 +225,8 @@ flags cw.compile CFLAGS <rtti>off : -RTTI off ;
flags cw.compile CFLAGS <warnings>on : -w on ;
flags cw.compile CFLAGS <warnings>off : -w off ;
flags cw.compile CFLAGS <warnings>all : -w all ;
flags cw.compile CFLAGS <warnings>extra : -w all ;
flags cw.compile CFLAGS <warnings>pedantic : -w all ;
flags cw.compile CFLAGS <warnings-as-errors>on : -w error ;
flags cw.compile USER_CFLAGS <cflags> : ;

View File

@@ -149,7 +149,7 @@ rule init ( version ? : command * : options * : requirement * )
flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
}
# - GCC on Darwin with -pedantic, suppress unsupported long long warning
flags darwin.compile OPTIONS $(condition)/<warnings>all : -Wno-long-long ;
flags darwin.compile OPTIONS $(condition)/<warnings>pedantic : -Wno-long-long ;
# - GCC on El Capitan (10.11) does not support -finline-functions
if "10.11.0" <= $(.host-osx-version)

View File

@@ -176,6 +176,7 @@ toolset.inherit-flags embarcadero
<cxxstd>1z
<cxxstd>17
<cxxstd>2a
<cxxstd>20
<cxxstd>latest
<cxxstd>98/<cxxstd-dialect>iso
<cxxstd>03/<cxxstd-dialect>iso
@@ -186,6 +187,7 @@ toolset.inherit-flags embarcadero
<cxxstd>1z/<cxxstd-dialect>iso
<cxxstd>17/<cxxstd-dialect>iso
<cxxstd>2a/<cxxstd-dialect>iso
<cxxstd>20/<cxxstd-dialect>iso
<cxxstd>latest/<cxxstd-dialect>iso
;

View File

@@ -46,9 +46,6 @@ toolset.inherit-flags emscripten : gcc
:
<optimization>off <optimization>speed <optimization>space
<profiling>off <profiling>on
<inlining>off <inlining>on <inlining>full
<warnings>off <warnings>all <warnings>on
<warnings-as-errors>off <warnings-as-errors>on
<debug-symbols>off <debug-symbols>on
<rtti>off <rtti>on
;
@@ -74,11 +71,6 @@ toolset.flags emscripten.compile OPTIONS <inlining>off : -fno-inline ;
toolset.flags emscripten.compile OPTIONS <inlining>on : -Wno-inline ;
toolset.flags emscripten.compile OPTIONS <inlining>full : -Wno-inline ;
toolset.flags emscripten.compile OPTIONS <warnings>off : -w ;
toolset.flags emscripten.compile OPTIONS <warnings>on : -Wall ;
toolset.flags emscripten.compile OPTIONS <warnings>all : -Wall -pedantic ;
toolset.flags emscripten.compile OPTIONS <warnings-as-errors>on : -Werror ;
toolset.flags emscripten OPTIONS <debug-symbols>off : -g0 ;
toolset.flags emscripten OPTIONS <debug-symbols>on : -g4 -s DEMANGLE_SUPPORT=1 ;
toolset.flags emscripten OPTIONS <rtti>off : -fno-rtti ;

View File

@@ -8,7 +8,7 @@ import feature ;
#| tag::doc[]
[[bbv2.builtin.features.cxxstd]]`cxxstd`::
*Allowed values*: `98`, `03`, `0x`, `11`, `1y`, `14`, `1z`, `17`, `2a`,
*Allowed values*: `98`, `03`, `0x`, `11`, `1y`, `14`, `1z`, `17`, `2a`, `20`,
`latest`.
+
Specifies the version of the C++ Standard Language to build with. All the
@@ -28,7 +28,7 @@ is supported.
|# # end::doc[]
feature.feature cxxstd
: 98 03 0x 11 1y 14 1z 17 2a latest
: 98 03 0x 11 1y 14 1z 17 2a 20 latest
: optional composite propagated ;
#| tag::doc[]

View File

@@ -27,10 +27,13 @@ feature.feature instruction-set
pentium3m pentium-m pentium4 pentium4m prescott nocona core2 corei7 corei7-avx core-avx-i
conroe conroe-xe conroe-l allendale merom merom-xe kentsfield kentsfield-xe penryn wolfdale
yorksfield nehalem sandy-bridge ivy-bridge haswell broadwell skylake skylake-avx512 cannonlake
icelake
icelake-client icelake-server cascadelake cooperlake tigerlake
atom
k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp k8 opteron athlon64 athlon-fx
k8-sse3 opteron-sse3 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 btver1
btver2 znver1 winchip-c6 winchip2 c3 c3-2 atom
btver2 znver1 znver2
winchip-c6 winchip2
c3 c3-2 c7
# ia64
itanium itanium1 merced itanium2 mckinley

View File

@@ -499,8 +499,11 @@ local rule compile-link-flags ( * )
local rule init-cxxstd-flags ( condition * : version )
{
local std ;
if [ version-ge $(version) : 8 ] { std = 2a ; }
if [ version-ge $(version) : 10 ] { std = 20 ; }
else if [ version-ge $(version) : 8 ] { std = 2a ; }
else if [ version-ge $(version) : 6 ] { std = 17 ; }
else if [ version-ge $(version) : 5 ] { std = 1z ; }
else if [ version-ge $(version) : 4.9 ] { std = 14 ; }
else if [ version-ge $(version) : 4.8 ] { std = 1y ; }
else if [ version-ge $(version) : 4.7 ] { std = 11 ; }
else if [ version-ge $(version) : 3.3 ] { std = 98 ; }
@@ -1260,7 +1263,11 @@ cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
cpu-flags gcc OPTIONS : x86 : icelake : -march=icelake ;
cpu-flags gcc OPTIONS : x86 : icelake-client : -march=icelake-client ;
cpu-flags gcc OPTIONS : x86 : icelake-server : -march=icelake-server ;
cpu-flags gcc OPTIONS : x86 : cascadelake : -march=skylake-avx512 -mavx512vnni ;
cpu-flags gcc OPTIONS : x86 : cooperlake : -march=cooperlake ;
cpu-flags gcc OPTIONS : x86 : tigerlake : -march=tigerlake ;
cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
@@ -1286,10 +1293,12 @@ cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
cpu-flags gcc OPTIONS : x86 : znver2 : -march=znver2 ;
cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
cpu-flags gcc OPTIONS : x86 : c7 : -march=c7 ;
##
cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
# Sparc

View File

@@ -779,6 +779,15 @@ cpu_flags('gcc', 'OPTIONS', 'x86', 'sandy-bridge', ['-march=corei7-avx'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'core-avx-i', ['-march=core-avx-i'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'ivy-bridge', ['-march=core-avx-i'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'haswell', ['-march=core-avx-i', '-mavx2', '-mfma', '-mbmi', '-mbmi2', '-mlzcnt'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'broadwell', ['-march=broadwell'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'skylake', ['-march=skylake'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'skylake-avx512', ['-march=skylake-avx512'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'cannonlake', ['-march=skylake-avx512', '-mavx512vbmi', '-mavx512ifma', '-msha'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'icelake-client', ['-march=icelake-client'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'icelake-server', ['-march=icelake-server'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'cascadelake', ['-march=skylake-avx512', '-mavx512vnni'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'cooperlake', ['-march=cooperlake'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'tigerlake', ['-march=tigerlake'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'k6', ['-march=k6'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'k6-2', ['-march=k6-2'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'k6-3', ['-march=k6-3'])
@@ -802,10 +811,13 @@ cpu_flags('gcc', 'OPTIONS', 'x86', 'bdver2', ['-march=bdver2'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'bdver3', ['-march=bdver3'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'btver1', ['-march=btver1'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'btver2', ['-march=btver2'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'znver1', ['-march=znver1'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'znver2', ['-march=znver2'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'winchip-c6', ['-march=winchip-c6'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'winchip2', ['-march=winchip2'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'c3', ['-march=c3'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'c3-2', ['-march=c3-2'])
cpu_flags('gcc', 'OPTIONS', 'x86', 'c7', ['-march=c7'])
##
cpu_flags('gcc', 'OPTIONS', 'x86', 'atom', ['-march=atom'])
# Sparc

View File

@@ -32,6 +32,8 @@ toolset.inherit-rules intel-darwin : gcc ;
toolset.inherit-flags intel-darwin : gcc
: <inlining>off <inlining>on <inlining>full <optimization>space
<warnings>off <warnings>all <warnings>on
<warnings>extra <warnings>pedantic
<warnings-as-errors>off <warnings-as-errors>on
<architecture>x86/<address-model>32
<architecture>x86/<address-model>64
;
@@ -139,10 +141,11 @@ flags intel-darwin.compile OPTIONS <optimization>space : -O1 ; # no specific spa
conroe conroe-xe conroe-l allendale merom
merom-xe kentsfield kentsfield-xe penryn wolfdale
yorksfield nehalem sandy-bridge ivy-bridge haswell
broadwell skylake skylake-avx512 cannonlake icelake ;
broadwell skylake skylake-avx512 cannonlake icelake-client
icelake-server cascadelake cooperlake tigerlake ;
.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3
bdver4 btver1 btver2 znver1 ;
bdver4 btver1 btver2 znver1 znver2 ;
.cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
flags intel-darwin.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
@@ -151,10 +154,16 @@ flags intel-darwin.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address
flags intel-darwin.compile.c OPTIONS <warnings>off : -w0 ;
flags intel-darwin.compile.c OPTIONS <warnings>on : -w1 ;
flags intel-darwin.compile.c OPTIONS <warnings>all : -w2 ;
flags intel-darwin.compile.c OPTIONS <warnings>extra : -w3 ;
flags intel-darwin.compile.c OPTIONS <warnings>pedantic : -w3 -Wcheck ;
flags intel-darwin.compile.c OPTIONS <warnings-as-errors>on : -Werror-all ;
flags intel-darwin.compile.c++ OPTIONS <warnings>off : -w0 ;
flags intel-darwin.compile.c++ OPTIONS <warnings>on : -w1 ;
flags intel-darwin.compile.c++ OPTIONS <warnings>all : -w2 ;
flags intel-darwin.compile.c++ OPTIONS <warnings>extra : -w3 ;
flags intel-darwin.compile.c++ OPTIONS <warnings>pedantic : -w3 -Wcheck ;
flags intel-darwin.compile.c++ OPTIONS <warnings-as-errors>on : -Werror-all ;
actions compile.c
{

View File

@@ -36,6 +36,8 @@ toolset.inherit-flags intel-linux : gcc
: <inlining>off <inlining>on <inlining>full
<optimization>space <optimization>speed
<warnings>off <warnings>all <warnings>on
<warnings>extra <warnings>pedantic
<warnings-as-errors>off <warnings-as-errors>on
;
if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
@@ -157,6 +159,9 @@ SPACE = " " ;
flags intel-linux.compile OPTIONS <warnings>off : -w0 ;
flags intel-linux.compile OPTIONS <warnings>on : -w1 ;
flags intel-linux.compile OPTIONS <warnings>all : -w2 ;
flags intel-linux.compile OPTIONS <warnings>extra : -w3 ;
flags intel-linux.compile OPTIONS <warnings>pedantic : -w3 -Wcheck ;
flags intel-linux.compile OPTIONS <warnings-as-errors>on : -Werror-all ;
rule compile.c++ ( targets * : sources * : properties * )
{

View File

@@ -31,6 +31,8 @@ toolset.inherit-rules intel-vxworks : gcc ;
toolset.inherit-flags intel-vxworks : gcc
: <inlining>off <inlining>on <inlining>full <optimization>space
<warnings>off <warnings>all <warnings>on
<warnings>extra <warnings>pedantic
<warnings-as-errors>off <warnings-as-errors>on
<architecture>x86/<address-model>32
<architecture>x86/<address-model>64
;
@@ -112,9 +114,13 @@ flags intel-vxworks.compile INCLUDES <include> ;
.cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
conroe conroe-xe conroe-l allendale merom
merom-xe kentsfield kentsfield-xe penryn wolfdale
yorksfield nehalem sandy-bridge ivy-bridge haswell ;
yorksfield nehalem sandy-bridge ivy-bridge haswell
broadwell skylake skylake-avx512 cannonlake
icelake-client icelake-server cascadelake cooperlake
tigerlake ;
.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 ;
athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2
znver1 znver2 ;
.cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
#flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
@@ -123,10 +129,16 @@ flags intel-vxworks.compile INCLUDES <include> ;
flags intel-vxworks.compile.c OPTIONS <warnings>off : -w0 ;
flags intel-vxworks.compile.c OPTIONS <warnings>on : -w1 ;
flags intel-vxworks.compile.c OPTIONS <warnings>all : -w2 ;
flags intel-vxworks.compile.c OPTIONS <warnings>extra : -w3 ;
flags intel-vxworks.compile.c OPTIONS <warnings>pedantic : -w3 -Wcheck ;
flags intel-vxworks.compile.c OPTIONS <warnings-as-errors>on : -Werror-all ;
flags intel-vxworks.compile.c++ OPTIONS <warnings>off : -w0 ;
flags intel-vxworks.compile.c++ OPTIONS <warnings>on : -w1 ;
flags intel-vxworks.compile.c++ OPTIONS <warnings>all : -w2 ;
flags intel-vxworks.compile.c++ OPTIONS <warnings>extra : -w3 ;
flags intel-vxworks.compile.c++ OPTIONS <warnings>pedantic : -w3 -Wcheck ;
flags intel-vxworks.compile.c++ OPTIONS <warnings-as-errors>on : -Werror-all ;
actions compile.c
{

View File

@@ -69,6 +69,9 @@ flags mipspro.compile OPTIONS <debug-symbols>on : -g ;
flags mipspro.compile OPTIONS <warnings>off : -w ;
flags mipspro.compile OPTIONS <warnings>on : -ansiW -diag_suppress 1429 ; # suppress long long is nonstandard warning
flags mipspro.compile OPTIONS <warnings>all : -fullwarn ;
flags mipspro.compile OPTIONS <warnings>extra : -fullwarn ;
flags mipspro.compile OPTIONS <warnings>pedantic : -fullwarn -ansiW -diag_suppress 1429 ; # suppress long long is nonstandard warning
flags mipspro.compile OPTIONS <warnings-as-errors>on : -w2 ;
flags mipspro.compile OPTIONS <optimization>speed : -Ofast ;
flags mipspro.compile OPTIONS <optimization>space : -O2 ;
flags mipspro.compile OPTIONS <cflags> : "-LANG:std" ;

View File

@@ -7,6 +7,7 @@
# Copyright (c) 2008 Jurko Gospodnetic
# Copyright (c) 2014 Microsoft Corporation
# Copyright (c) 2019 Michał Janiszewski
# Copyright (c) 2020 Nikita Kniazev
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
@@ -36,7 +37,7 @@ command line tools are listed below:
The user would then call the boost build executable with the toolset set
equal to `msvc-[version number]` for example to build with Visual Studio
2017 one could run:
2019 one could run:
----
.\b2 toolset=msvc-14.2 target
@@ -229,6 +230,7 @@ import set ;
import toolset ;
import type ;
import virtual-target ;
import version ;
type.register MANIFEST : manifest ;
@@ -454,6 +456,21 @@ rule configure-version-specific ( toolset : version : conditions )
}
}
# 12.0 (VS2013 Update 2) introduced /Zc:inline opt-in standard conformance
# compiler flag that also similar to linker /opt:ref removes unreferenced
# variables and functions that have internal linkage
if ! [ version.version-less [ SPLIT_BY_CHARACTERS $(version) : . ] : 12 ]
{
toolset.flags $(toolset).compile CFLAGS $(conditions) : "/Zc:inline" ;
}
# 14.0 introduced /Zc:throwingNew opt-in flag that disables a workaround
# for not throwing operator new in VC up to 6.0
if ! [ version.version-less [ SPLIT_BY_CHARACTERS $(version) : . ] : 14 ]
{
toolset.flags $(toolset).compile CFLAGS $(conditions) : "/Zc:throwingNew" ;
}
#
# Processor-specific optimization.
#
@@ -735,7 +752,7 @@ rule compile.rc ( targets + : sources * : properties * )
actions compile.rc
{
$(.SETUP) $(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES:W)" -fo "$(<:W)" "$(>:W)"
$(.SETUP) $(.RC) /nologo -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES:W)" -fo "$(<:W)" "$(>:W)"
}
toolset.uses-features msvc.link : <embed-manifest> <embed-manifest-file> ;
@@ -801,19 +818,15 @@ rule link.dll ( targets + : sources * : properties * )
# assemblies and Windows native DLLs. The manifests are embedded as resources
# and are useful in any PE target (both DLL and EXE).
if [ os.name ] in NT
{
actions link bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
{
$(.SETUP) $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
}
actions manifest
{
if exist "$(<[1]).manifest" (
$(.SETUP) $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
)
$(.SETUP) $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
}
actions manifest.user bind EMBED_MANIFEST_FILE
@@ -824,44 +837,11 @@ if [ os.name ] in NT
actions link.dll bind IMPORT_LIB DEF_FILE LIBRARIES_MENTIONED_BY_FILE
{
$(.SETUP) $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(IMPORT_LIB:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
}
actions manifest.dll
{
if exist "$(<[1]).manifest" (
$(.SETUP) $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
)
}
actions manifest.dll.user bind EMBED_MANIFEST_FILE
{
$(.SETUP) $(.MT) -manifest "$(EMBED_MANIFEST_FILE)" "-outputresource:$(<[1]);2"
}
}
else
{
actions link bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
{
$(.SETUP) $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
}
actions manifest
{
if test -e "$(<[1]).manifest"; then
$(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);1"
fi
}
actions link.dll bind IMPORT_LIB DEF_FILE LIBRARIES_MENTIONED_BY_FILE
{
$(.SETUP) $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(IMPORT_LIB:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
}
actions manifest.dll
{
if test -e "$(<[1]).manifest"; then
$(.SETUP) $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);2"
fi
$(.SETUP) $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
}
actions manifest.dll.user bind EMBED_MANIFEST_FILE
@@ -2020,15 +2000,16 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
# detailed information.
.cpu-type-g5 = i586 pentium pentium-mmx ;
.cpu-type-g6 = i686 pentiumpro pentium2 pentium3 pentium3m pentium-m k6
k6-2 k6-3 winchip-c6 winchip2 c3 c3-2 ;
k6-2 k6-3 winchip-c6 winchip2 c3 c3-2 c7 ;
.cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
conroe conroe-xe conroe-l allendale merom
merom-xe kentsfield kentsfield-xe penryn wolfdale
yorksfield nehalem sandy-bridge ivy-bridge haswell
broadwell skylake skylake-avx512 cannonlake icelake ;
broadwell skylake skylake-avx512 cannonlake icelake-client
icelake-server cascadelake cooperlake tigerlake ;
.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3
bdver4 btver1 btver2 znver1 ;
bdver4 btver1 btver2 znver1 znver2 ;
.cpu-type-g7 = pentium4 pentium4m athlon athlon-tbird athlon-4 athlon-xp
athlon-mp $(.cpu-type-em64t) $(.cpu-type-amd64) ;
.cpu-type-itanium = itanium itanium1 merced ;

View File

@@ -1252,12 +1252,13 @@ __cpu_arch_ia64 = [
# detailed information.
__cpu_type_g5 = ['i586', 'pentium', 'pentium-mmx' ]
__cpu_type_g6 = ['i686', 'pentiumpro', 'pentium2', 'pentium3', 'pentium3m', 'pentium-m', 'k6',
'k6-2', 'k6-3', 'winchip-c6', 'winchip2', 'c3', 'c3-2' ]
'k6-2', 'k6-3', 'winchip-c6', 'winchip2', 'c3', 'c3-2', 'c7' ]
__cpu_type_em64t = ['prescott', 'nocona', 'core2', 'corei7', 'corei7-avx', 'core-avx-i', 'conroe', 'conroe-xe', 'conroe-l', 'allendale', 'merom',
'merom-xe', 'kentsfield', 'kentsfield-xe', 'penryn', 'wolfdale',
'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell' ]
'yorksfield', 'nehalem', 'sandy-bridge', 'ivy-bridge', 'haswell', 'broadwell', 'skylake', 'skylake-avx512', 'cannonlake',
'icelake-client', 'icelake-server', 'cascadelake', 'cooperlake', 'tigerlake' ]
__cpu_type_amd64 = ['k8', 'opteron', 'athlon64', 'athlon-fx', 'k8-sse3', 'opteron-sse3', 'athlon64-sse3', 'amdfam10', 'barcelona',
'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2' ]
'bdver1', 'bdver2', 'bdver3', 'btver1', 'btver2', 'znver1', 'znver2' ]
__cpu_type_g7 = ['pentium4', 'pentium4m', 'athlon', 'athlon-tbird', 'athlon-4', 'athlon-xp'
'athlon-mp'] + __cpu_type_em64t + __cpu_type_amd64
__cpu_type_itanium = ['itanium', 'itanium1', 'merced']

View File

@@ -83,7 +83,9 @@ flags pathscale.compile OPTIONS <inlining>full : -inline ;
flags pathscale.compile OPTIONS <warnings>off : -woffall ;
flags pathscale.compile OPTIONS <warnings>on : -Wall ;
flags pathscale.compile OPTIONS <warnings>all : -Wall -pedantic ;
flags pathscale.compile OPTIONS <warnings>all : -Wall ;
flags pathscale.compile OPTIONS <warnings>extra : -Wall -Wextra ;
flags pathscale.compile OPTIONS <warnings>pedantic : -Wall -Wextra -pedantic ;
flags pathscale.compile OPTIONS <warnings-as-errors>on : -Werror ;
flags pathscale.compile OPTIONS <debug-symbols>on : -ggdb ;

View File

@@ -57,6 +57,7 @@ flags pgi.compile.c++ OPTIONS <cxxstd>14 : -std=c++14 ;
flags pgi.compile.c++ OPTIONS <cxxstd>1z : -std=c++17 ;
flags pgi.compile.c++ OPTIONS <cxxstd>17 : -std=c++17 ;
flags pgi.compile.c++ OPTIONS <cxxstd>2a : -std=c++17 ;
flags pgi.compile.c++ OPTIONS <cxxstd>20 : -std=c++17 ;
flags pgi.compile.c++ OPTIONS <cxxstd>latest : -std=c++17 ;
flags pgi.compile OPTIONS <link>shared : -fpic ;
@@ -68,6 +69,8 @@ flags pgi.compile OPTIONS <optimization>space : -fast ;
flags pgi.compile OPTIONS <warnings>off : -Minform=severe ;
flags pgi.compile OPTIONS <warnings>on : -Minform=warn ;
flags pgi.compile OPTIONS <warnings>all : -Minform=warn ;
flags pgi.compile OPTIONS <warnings>extra : -Minform=inform ;
flags pgi.compile OPTIONS <warnings>pedantic : -Minform=inform ;
flags pgi.compile OPTIONS <warnings-as-errors>on : -Werror ;
flags pgi.compile.c++ OPTIONS <rtti>off : --no_rtti ;

View File

@@ -99,6 +99,8 @@ toolset.flags qcc.compile OPTIONS <inlining>full : -Wc,-finline-functions -Wc,-W
toolset.flags qcc.compile OPTIONS <warnings>off : -w ;
toolset.flags qcc.compile OPTIONS <warnings>all : -Wc,-Wall ;
toolset.flags qcc.compile OPTIONS <warnings>extra : -Wc,-Wall -Wc,-Wextra ;
toolset.flags qcc.compile OPTIONS <warnings>pedantic : -Wc,-Wall -Wc,-Wextra -Wc,-pedantic ;
toolset.flags qcc.compile OPTIONS <warnings-as-errors>on : -Wc,-Werror ;
toolset.flags qcc.compile OPTIONS <profiling>on : -p ;

View File

@@ -106,6 +106,8 @@ flags sun.compile OPTIONS <threading>multi : -mt ;
flags sun.compile OPTIONS <warnings>off : -erroff ;
flags sun.compile OPTIONS <warnings>on : -erroff=%none ;
flags sun.compile OPTIONS <warnings>all : -erroff=%none ;
flags sun.compile OPTIONS <warnings>extra : -erroff=%none ;
flags sun.compile OPTIONS <warnings>pedantic : -erroff=%none ;
flags sun.compile OPTIONS <warnings-as-errors>on : -errwarn ;
flags sun.compile OPTIONS <local-visibility>hidden : -xldscope=hidden ;

View File

@@ -93,6 +93,8 @@ flags vmsdecc.compile OPTIONS <optimization>space : /OPT=INLINE=SIZE/OPT=NOINLIN
flags vmsdecc.compile OPTIONS <warnings>off : /NOWARN ;
flags vmsdecc.compile OPTIONS <warnings>on : /WARN ;
flags vmsdecc.compile OPTIONS <warnings>all : /WARN=ENABLE=ALL ;
flags vmsdecc.compile OPTIONS <warnings>extra : /WARN=ENABLE=ALL ;
flags vmsdecc.compile OPTIONS <warnings>pedantic : /WARN=ENABLE=ALL ;
flags vmsdecc.compile.c++ OPTIONS <inlining>off : /OPT=NOINLINE ;

View File

@@ -112,6 +112,10 @@ flags xlcpp.compile.c++ OPTIONS <cxxstd>0x : -std=c++11 ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>11 : -std=c++11 ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>1y : -std=c++1y ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>14 : -std=c++1y ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>1z : -std=c++1y ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>17 : -std=c++1y ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>2a : -std=c++1y ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>20 : -std=c++1y ;
flags xlcpp.compile.c++ OPTIONS <cxxstd>latest : -std=c++1y ;
flags xlcpp.compile OPTIONS <cflags> ;