Index: pstl/trunk/build/Makefile =================================================================== --- pstl/trunk/build/Makefile +++ pstl/trunk/build/Makefile @@ -1,101 +0,0 @@ -#===-- Makefile ----------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -#------------------------------------------------------------------------------ -# Define rules for making the Parallel STL library. -#------------------------------------------------------------------------------ - - -proj_root ?= $(CURDIR)/.. - -include $(proj_root)/build/Makefile.common -CPLUS := $(compiler) $(COMPILER_NOLOGO_KEY) $(USE_SHARED_CPPRUNTIME_KEY) - -.SECONDARY: -.PHONY: clean clean_all clean_pstl bench - -VPATH = $(proj_root)/test - -CPLUS_FLAGS += -I$(proj_root) - -PSTL_MAKEFILE = $(proj_root)/build/Makefile.pstl -BENCH_MAKEFILE = $(proj_root)/build/Makefile.bench - - -test_hdr = $(wildcard $(proj_root)/test/*.h) -test_src = $(wildcard $(proj_root)/test/test_*.cpp) -test_bin = $(notdir $(test_src:.cpp=.exe)) - - -all: $(test_bin) - -test_%.offload.exe: test_%.offload$(OBJ_SFX) exception_list.offload$(OBJ_SFX) - $(CPLUS) $(CPLUS_FLAGS) $^ $(FKEY)o$@ $(LDFLAGS) - -$(PSTL_LIB_NAME): - $(MAKE) -f $(PSTL_MAKEFILE) backend=$(backend) cfg=$(cfg) - -test_%.exe: test_%$(OBJ_SFX) $(PSTL_LIB_NAME) - $(LD) $< $(LD_OUT_KEY)$@ $(LDFLAGS) $(DYN_LDFLAGS) $(PSTL_LIB_LINK) - -test_%: test_%.exe - $(run_cmd) $(RUN_CMD)test_$*.exe - -test_%$(OBJ_SFX): test_%.cpp $(test_hdr) $(proj_root)/build/Makefile - $(CPLUS) $(CPLUS_FLAGS) -c $< $(FKEY)o$@ - -# This definition intentionally consists of two blank lines -define eol - - -endef - -test: $(test_bin) - $(foreach test, $(test_bin), $(run_cmd) $(RUN_CMD)$(test) $(args) $(eol)) - -%.s: %.cpp $(proj_root)/build/Makefile - $(CPLUS) $(CPLUS_FLAGS) -S $< $(FKEY)o$@ - -%.E: %.cpp - $(CPLUS) $(CPLUS_FLAGS) -E $< >$@ - -TEMPLATE_FILES=$(wildcard $(proj_root)/bench/*.*tmpl) -BENCH_COMMON_FILES=$(wildcard $(proj_root)/bench/*.h) $(wildcard $(proj_root)/bench/*.cpp) - -$(BENCH_MAKEFILE): $(proj_root)/bench/algorithm.json $(proj_root)/bench/gen.py $(TEMPLATE_FILES) - $(PYTHON) $(proj_root)/bench/gen.py $(proj_root)/bench/algorithm.json - -bench : $(BENCH_MAKEFILE) $(BENCH_COMMON_FILES) $(PSTL_LIB_NAME) - @echo TEMPLATE_FILES=$(TEMPLATE_FILES) - @echo proj_root=$(proj_root) - ls -la $(proj_root)/bench/gen.py - $(MAKE) -f $(BENCH_MAKEFILE) - -clean_bench: - $(DEL_CMD) $(BENCH_MAKEFILE) - $(DEL_CMD) batch.py - $(DEL_CMD) $(proj_root)/build/bench/*.* - -clean: - $(DEL_CMD) *$(OBJ_SFX) *.exe *.E *.s *.asm *.d *.pdb *.pdb *.suo *.ilk - -clean_pstl: - $(MAKE) -f $(PSTL_MAKEFILE) clean - -clean_all: clean clean_pstl clean_bench - -info: - @echo OS = $(os_name) - @echo proj_root = "$(proj_root)" - @echo $(CURDIR) - @echo VPATH = $(VPATH) - @echo LIBRARY_PATH = $(LIBRARY_PATH) - @echo backend = $(backend) - @echo compiler = $(compiler) - --include *.d Index: pstl/trunk/build/Makefile.common =================================================================== --- pstl/trunk/build/Makefile.common +++ pstl/trunk/build/Makefile.common @@ -1,112 +0,0 @@ -#===-- Makefile.common ---------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -#------------------------------------------------------------------------------ -# Define common parts for Parallel STL -#------------------------------------------------------------------------------ - -.SUFFIXES: - -goals = $(or $(MAKECMDGOALS),all) -ifneq (, $(filter-out clean clean_all,$(goals))) - ifeq (, $(filter $(backend), tbb)) - $(info Threading backend was not specified; using TBB) - backend=tbb - endif -endif - -ifndef os_name - # Windows sets environment variable OS; for other systems, ask uname - ifeq ($(OS),) - OS:=$(shell uname) - ifeq ($(OS),) - $(error "Cannot detect operating system") - endif - os_name=$(OS) - endif - - ifeq ($(OS), Windows_NT) - os_name=windows - endif - ifeq ($(OS), Linux) - os_name=linux - endif - ifeq ($(OS), Darwin) - os_name=macos - endif -endif # !os_name - -cfg ?= release -stdver ?= c++11 - -override INCLUDES += -I$(proj_root)/include -I$(proj_root)/test - -TEST_MACRO += -D__PSTL_TEST_SUCCESSFUL_KEYWORD=1 - -ifeq ($(backend), tbb) - BACKEND_MACRO += -D__PSTL_PAR_BACKEND_TBB -endif - -target ?= $(os_name) -#OS specific keys -ifeq ($(target),windows) - ifneq (, $(filter $(compiler), gcc g++)) - include $(proj_root)/build/mingw.inc - else - include $(proj_root)/build/windows.inc - endif -else - include $(proj_root)/build/unix.inc - ifneq (,$(wildcard $(proj_root)/build/$(target).inc)) - include $(proj_root)/build/$(target).inc - $(info included additional file $(proj_root)/build/$(target).inc) - endif -endif - -# compiler specific keys -ifneq (, $(filter $(compiler), gcc g++)) - include $(proj_root)/build/gcc.inc -endif - -ifneq (, $(filter $(compiler), clang clang++)) - include $(proj_root)/build/clang.inc -endif - -ifneq (, $(filter $(compiler), icc icpc icx)) - include $(proj_root)/build/icc.inc -endif - -ifneq (, $(filter $(compiler), icl)) - include $(proj_root)/build/icl.inc -endif - - -OPTIMIZATION_ENABLED_FLAGS += $(XHOST_FLAG) -OPTIMIZATION_DISABLED_FLAGS += $(XHOST_FLAG) - - -ifeq ($(cfg), debug) - TBB_LIB_NAME = tbb_debug - BACKEND_MACRO += -DTBB_USE_DEBUG=1 - DEBUG_MACRO += -DPSTL_USE_DEBUG - OPTIMIZATION_KEYS = $(OPTIMIZATION_DISABLED_FLAGS) -else - OPTIMIZATION_KEYS = $(OPTIMIZATION_ENABLED_FLAGS) -endif - -DYN_LDFLAGS += $(PSTL_ARCH) - -CPLUS_FLAGS += $(TEST_MACRO) -CPLUS_FLAGS += $(INCLUDES) -CPLUS_FLAGS += $(BACKEND_MACRO) -CPLUS_FLAGS += $(DEBUG_MACRO) -CPLUS_FLAGS += $(CXXFLAGS) -CPLUS_FLAGS += $(OPTIMIZATION_KEYS) - -CPLUS_FLAGS += $(DISABLED_WARNINGS) -CPLUS_FLAGS += $(PSTL_ARCH) Index: pstl/trunk/build/Makefile.pstl =================================================================== --- pstl/trunk/build/Makefile.pstl +++ pstl/trunk/build/Makefile.pstl @@ -1,46 +0,0 @@ -#===-- Makefile.pstl -----------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -#------------------------------------------------------------------------------ -# Define rules for making the Parallel STL library. -#------------------------------------------------------------------------------ - -proj_root ?= $(CURDIR)/.. - -include $(proj_root)/build/Makefile.common - -.PHONY: clean - -VPATH = $(proj_root)/src - -lib_src = $(wildcard $(proj_root)/src/*.cpp) -lib_obj = $(notdir $(lib_src:.cpp=$(OBJ_SFX))) - -all: pstl - -pstl: $(PSTL_LIB_NAME) - -%$(OBJ_SFX): %.cpp $(proj_root)/build/Makefile.pstl - $(CPLUS) $(CPLUS_FLAGS) -c $< $(FKEY)o$@ - -%.s: %.cpp $(proj_root)/build/Makefile - $(CPLUS) $(CPLUS_FLAGS) -S $< $(FKEY)o$@ - -%.E: %.cpp - $(CPLUS) $(CPLUS_FLAGS) -E $< >$@ - -clean: - $(DEL_CMD) *$(OBJ_SFX) *.lib *.dll *.so *.exp *$(PSTL_LIB_NAME)* - -info: - @echo OS = $(os_name) - @echo proj_root = "$(proj_root)" - @echo $(CURDIR) - @echo VPATH=$(VPATH) - --include *.d Index: pstl/trunk/build/android.inc =================================================================== --- pstl/trunk/build/android.inc +++ pstl/trunk/build/android.inc @@ -1,47 +0,0 @@ -#===-- android.inc -------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -PSTL_ARCH= -PIE_FLAGS = -pie -fPIE -fPIC -SDL_FLAGS = -fstack-protector -Wformat -Wformat-security -CPLUS_FLAGS += $(TARGET_CFLAGS) $(PIE_FLAGS) $(SDL_FLAGS) - -# Paths to the NDK prebuilt tools and libraries -ifeq (,$(findstring $(ndk_version), $(foreach v, 7 8 9 10 11 12 13 14 15,r$(v) r$(v)b r$(v)c r$(v)d r$(v)e))) - ifeq (clang,$(compiler)) - # Since Android* NDK r16 another sysroot and isystem paths have to be specified - CPLUS_FLAGS += --sysroot=$(NDK_ROOT)/sysroot -isystem $(NDK_ROOT)/sysroot/usr/include/$(TRIPLE) - # Android* version flag required since r16 - CPLUS_FLAGS += -D__ANDROID_API__=$(API_LEVEL) - else - CPLUS_FLAGS += --sysroot=$(SYSROOT) - endif -else - CPLUS_FLAGS += --sysroot=$(SYSROOT) -endif - -LDFLAGS += --sysroot=$(SYSROOT) $(TARGET_CFLAGS) -PSTL_LIB_LINK += -lc++abi -L$(CPLUS_LIB_PATH) -lc++_shared - -ifeq (arm,$(arch)) - PSTL_LIB_LINK += -lunwind -endif - -# TARGET_CXX cames from NDK -override CPLUS:=$(TARGET_CXX) $(USE_SHARED_CPPRUNTIME_KEY) -LD = $(CPLUS) $(TARGET_CFLAGS) $(PIE_FLAGS) $(SDL_FLAGS) - -run_cmd ?= -sh $(proj_root)/build/android.linux.launcher.sh $(largs) - -# TBB_LIBRARIES := $(foreach dir,$(LIBRARY_PATH),$(wildcard $(dir)/libtbb*so)) -TBB_LIBRARIES := $(foreach dir,$(LIBRARY_PATH),$(wildcard $(dir)/*)) -LIB_STL_ANDROID += $(TBB_LIBRARIES) - -$(warning LIB_STL_ANDROID=$(LIB_STL_ANDROID)) -$(warning TBB_LIBRARIES=$(TBB_LIBRARIES)) -$(warning LIBRARY_PATH=$(LIBRARY_PATH)) Index: pstl/trunk/build/android.linux.launcher.sh =================================================================== --- pstl/trunk/build/android.linux.launcher.sh +++ pstl/trunk/build/android.linux.launcher.sh @@ -1,148 +0,0 @@ -#!/bin/sh -#===-- android.linux.launcher.sh -----------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## -# -# - -# Usage: -# android.linux.launcher.sh [-v] [-q] [-s] [-r ] [-u] [-l ] -# where: -v enables verbose output -# where: -q enables quiet mode -# where: -s runs the test in stress mode (until non-zero exit code or ctrl-c pressed) -# where: -r specifies number of times to repeat execution -# where: -u is ignored on Android -# where: -l specifies the library name to be assigned to LD_PRELOAD -# -# Libs and executable necessary for testing should be present in the current directory before running. -# ANDROID_SERIAL must be set to the connected Android target device name for file transfer and test runs. -# ANDROID_TEST_DIRECTORY may be set to the directory used for testing on the Android target device; otherwise, -# the default directory used is "/data/local/tmp/$(basename $PWD)". -# Note: Do not remove the redirections to '/dev/null' in the script, otherwise the nightly test system will fail. - -do_cleanup() # -{ # - adb pull $targetdir/events.txt events.txt > /dev/null 2>&1 # - # Remove target directory on the device - adb shell "rm -r ${targetdir}; mkdir -p ${targetdir}" > /dev/null 2>&1 # -} # -do_trap_cleanup() # -{ # - do_cleanup # - exit -1 # -} # -while getopts "qvsr:ul:" flag # -do case $flag in # - s ) # Stress testing mode - echo Doing stress testing. Press Ctrl-C to terminate - run_env='stressed() { while $*; do :; done; }; ' # - run_prefix="stressed $run_prefix" ;; # - r ) # Repeats test n times - run_env="repeated() { for i in $(seq -s ' ' 1 $OPTARG) ; do echo \$i of $OPTARG:; \$*; done; }; " # - run_prefix="repeated $run_prefix" ;; # - l ) # Additional library - ldpreload="$OPTARG " ;; # - u ) # Stack limit - ;; # - q ) # Quiet mode, removes 'done' but prepends any other output by test name - OUTPUT='2>&1 | sed -e "s/done//;/^[[:space:]]*$/d;s!^!$exename: !"' ;; # - v ) # Verbose mode - SUPPRESS='' # - verbose=1 ;; # -esac done # -shift `expr $OPTIND - 1` # -[ -z "$OUTPUT" ] && OUTPUT='| sed -e "s/\\r$//"' # -[ $verbose ] || SUPPRESS='>/dev/null' # -# Collect the executable name -exename=$(basename $1) # -shift # - -# Prepare the target directory on the device -currentdir=$(basename $PWD) # -targetdir=${ANDROID_TEST_DIRECTORY:-/data/local/tmp/$currentdir} # -do_cleanup # -trap do_trap_cleanup INT # if someone hits control-c, cleanup the device - -# Collect the list of files to transfer to the target device, starting with executable itself. -fnamelist="$exename" # -# Add the C++ standard library from the NDK, which is required for all tests on Android. -if [ ! -z "${LIB_STL_ANDROID}" ]; then # - fnamelist="$fnamelist ${LIB_STL_ANDROID}" # -else # - fnamelist="$fnamelist libc++_shared.so" # -fi # - -# Find the TBB libraries and add them to the list. - -OLD_SEP=$IFS -IFS=':' -for dir in $LD_LIBRARY_PATH; do # - found="`ls $dir/lib*.so 2>/dev/null` "||: # - fnamelist+="$fnamelist $found" -done # -IFS=$OLD_SEP - -files="$(ls libtbb* 2> /dev/null)" # -[ -z "$files" ] || fnamelist="$fnamelist $files" # - -# Add any libraries built for specific tests. -exeroot=${exename%\.*} # -files="$(ls ${exeroot}*.so ${exeroot}*.so.* 2> /dev/null)" # -[ -z "$files" ] || fnamelist="$fnamelist $files" # - -# Transfer collected executable and library files to the target device. -transfers_ok=1 # -for fullname in $fnamelist; do { # - if [ -r $fullname ]; then { # - # Transfer the executable and libraries to top-level target directory - if [ "$OS" = 'Windows_NT' ]; then # - fullname=`cygpath -m "$fullname"` # - fi # - [ $verbose ] && echo -n "Pushing $fullname: " # - eval "adb push $fullname ${targetdir}/$(basename $fullname) $SUPPRESS 2>&1" # - }; else { # - echo "Error: required file ${currentdir}/${fullname} for test $exename not available for transfer." # - transfers_ok=0 # - }; fi # -}; done # -if [ "${transfers_ok}" = "0" ]; then { # - do_cleanup # - exit -1 # -}; fi # -# Transfer input files used by example codes by scanning the executable argument list. -for fullname in "$@"; do { # - if [ -r $fullname ]; then { # - directory=$(dirname $fullname) # - filename=$(basename $fullname) # - # strip leading "." from fullname if present - if [ "$directory" = "\." ]; then { # - directory="" # - fullname=$filename # - }; fi # - # Create the target directory to hold input file if necessary - if [ ! -z $directory ]; then { # - eval "adb shell 'mkdir $directory' $SUPPRESS 2>&1" # - }; fi # - # Transfer the input file to corresponding directory on target device - [ $verbose ] && echo -n "Pushing $fullname: " # - eval "adb push $fullname ${targetdir}/$fullname $SUPPRESS 2>&1" # - }; fi # -}; done # - -# Set LD_PRELOAD if necessary -[ -z "$ldpreload" ] || run_prefix="LD_PRELOAD='$ldpreload' $run_prefix" # -[ $verbose ] && echo Running $run_prefix ./$exename $* # -run_env="$run_env cd $targetdir; export LD_LIBRARY_PATH=." # -[ -z "$VIRTUAL_MACHINE" ] || run_env="$run_env; export VIRTUAL_MACHINE=$VIRTUAL_MACHINE" # -# The return_code file is the best way found to return the status of the test execution when using adb shell. -eval 'adb shell "$run_env; $run_prefix ./$exename $* || echo -n \$? >error_code"' "${OUTPUT}" # -# Capture the return code string and remove the trailing \r from the return_code file contents -err=`adb shell "cat $targetdir/error_code 2>/dev/null"` # -[ -z $err ] || echo $exename: exited with error $err # -do_cleanup # -# Return the exit code of the test. -exit $err # Index: pstl/trunk/build/clang.inc =================================================================== --- pstl/trunk/build/clang.inc +++ pstl/trunk/build/clang.inc @@ -1,21 +0,0 @@ -#===-- clang.inc ---------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -override compiler:=clang++ - -ifneq ($(target),android) - PSTL_ARCH += $(KEY)march=native -endif - -XHOST_FLAG = -fno-vectorize -CPLUS_FLAGS += $(FQKEY)std=$(stdver) -# XHOST_FLAG = $(KEY)mavx2 -fno-vectorize -# XHOST_FLAG = $(KEY)mavx512f -fno-vectorize -# DYN_LDFLAGS += $(LINK_KEY)c++ -# CPLUS_FLAGS += -stdlib=libc++ -# CPLUS_FLAGS += -fopenmp-simd //it will be supported in he future version Index: pstl/trunk/build/gcc.inc =================================================================== --- pstl/trunk/build/gcc.inc +++ pstl/trunk/build/gcc.inc @@ -1,27 +0,0 @@ -#===-- gcc.inc -----------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -override compiler:=g++ -XHOST_FLAG = $(KEY)march=native -fno-tree-vectorize -# XHOST_FLAG = $(KEY)mavx2 -fno-tree-vectorize -# XHOST_FLAG = $(KEY)mavx512f -fno-tree-vectorize - DYN_LDFLAGS += $(LINK_KEY)stdc++ -# GCC 4.8.5 and early doesn't support -fopenmp-simd; GCC 4.9 supports OpenMP 4.0 for C/C++ -ifneq (, $(shell gcc -dumpversion | egrep "^4\.9\.[0-9]")) - CPLUS_FLAGS += -fopenmp-simd -endif -ifneq (, $(shell gcc -dumpversion | egrep "^[5-9]\.[0-9]\.[0-9]")) - CPLUS_FLAGS += -fopenmp-simd -# CPLUS_FLAGS += -fdump-rtl-loop2 #use this option to enable optimization report -endif - -CPLUS_FLAGS += $(FQKEY)std=$(stdver) - -ifeq ($(os_name),windows) -DISABLED_WARNINGS = $(KEY)Wno-attributes #disable MinGW warnings about extended alignment -endif Index: pstl/trunk/build/icc.inc =================================================================== --- pstl/trunk/build/icc.inc +++ pstl/trunk/build/icc.inc @@ -1,23 +0,0 @@ -#===-- icc.inc -----------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -vecreport ?= 0 #may be set to [0..7], see https://software.intel.com/en-us/node/522949 for details - -XHOST_FLAG = $(KEY)xHOST -no-vec -CPLUS_FLAGS += $(QKEY)opt-assume-safe-padding - -# XHOST_FLAG = $(KEY)xCORE-AVX2 -no-vec -# XHOST_FLAG = $(KEY)xSSE4.1 -no-vec -# XHOST_FLAG = $(KEY)xMIC-AVX512 -no-vec - -CPLUS_FLAGS += $(QKEY)openmp-simd -CPLUS_FLAGS += $(FQKEY)MMD -CPLUS_FLAGS += $(FQKEY)std=$(stdver) -CPLUS_FLAGS += $(QKEY)opt-report=$(vecreport) $(QKEY)opt-report-phase vec - -OPTIMIZATION_DISABLED_FLAGS += $(KEY)debug inline-debug-info Index: pstl/trunk/build/icl.inc =================================================================== --- pstl/trunk/build/icl.inc +++ pstl/trunk/build/icl.inc @@ -1,22 +0,0 @@ -#===-- icl.inc -----------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -vecreport ?= 0 #may be set to [0..7], see https://software.intel.com/en-us/node/522949 for details - -XHOST_FLAG = $(QKEY)xHOST -XHOST_FLAG = $(QKEY)vec- -# XHOST_FLAG = $(QKEY)xCORE-AVX2 -# XHOST_FLAG = $(QKEY)xSSE4.1 -# XHOST_FLAG = $(QKEY)xMIC-AVX512 -CPLUS_FLAGS += $(QKEY)opt-assume-safe-padding -CPLUS_FLAGS += $(QKEY)openmp-simd -CPLUS_FLAGS += $(FQKEY)MMD -CPLUS_FLAGS += $(FQKEY)std=$(stdver) -CPLUS_FLAGS += $(QKEY)opt-report:$(vecreport) $(QKEY)opt-report-phase:vec $(QKEY)opt-report-phase:loop - -DISABLED_WARNINGS = $(QKEY)diag-disable:2586 #use comma-separated values to specify multiple entries Index: pstl/trunk/build/jni/Android.mk =================================================================== --- pstl/trunk/build/jni/Android.mk +++ pstl/trunk/build/jni/Android.mk @@ -1,53 +0,0 @@ -#===-- Android.mk --------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -export proj_root?=$(NDK_PROJECT_PATH)/.. - -ifeq (armeabi-v7a,$(APP_ABI)) - export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm -else ifeq (arm64-v8a,$(APP_ABI)) - export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm64 -else - export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-$(APP_ABI) -endif - -ifeq (windows,$(os_name)) - export CPATH_SEPARATOR :=; -else - export CPATH_SEPARATOR :=: -endif - -export ANDROID_NDK_ROOT:=$(NDK_ROOT) -export ndk_version:=$(lastword $(subst -, ,$(ANDROID_NDK_ROOT))) -ndk_version:= $(firstword $(subst /, ,$(ndk_version))) -ndk_version:= $(firstword $(subst \, ,$(ndk_version))) - -ifeq (clang,$(compiler)) - # "TBB_RTL :=llvm-libc++/libcxx" should be used for ndk_version r13 r13b r14. - TBB_RTL :=llvm-libc++ - TBB_RTL_LIB :=llvm-libc++ - TBB_RTL_FILE :=libc++_shared.so -else - TBB_RTL :=gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION) - TBB_RTL_LIB :=$(TBB_RTL) - TBB_RTL_FILE :=libgnustl_shared.so -endif - -export CPATH := $(INCLUDE)$(CPATH_SEPARATOR)$(SYSROOT)/usr/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/cxx-stl/$(TBB_RTL)/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/cxx-stl/$(TBB_RTL)/libs/$(APP_ABI)/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/android/support/include - -LIB_STL_ANDROID_DIR := $(NDK_ROOT)/sources/cxx-stl/$(TBB_RTL_LIB)/libs/$(APP_ABI) -#LIB_STL_ANDROID is required to be set up for copying Android specific library to a device next to test -export LIB_STL_ANDROID := $(LIB_STL_ANDROID_DIR)/$(TBB_RTL_FILE) -export CPLUS_LIB_PATH := $(SYSROOT)/usr/lib -L$(LIB_STL_ANDROID_DIR) -export target_os_version:=$(APP_PLATFORM) -export tbb_tool_prefix:=$(TOOLCHAIN_PREFIX) -export TARGET_CXX -export TARGET_CC -export TARGET_CFLAGS - -include $(proj_root)/build/Makefile Index: pstl/trunk/build/jni/Application.mk =================================================================== --- pstl/trunk/build/jni/Application.mk +++ pstl/trunk/build/jni/Application.mk @@ -1,60 +0,0 @@ -#===-- Application.mk ----------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - - -ifndef os_name - # Windows sets environment variable OS; for other systems, ask uname - ifeq ($(OS),) - OS:=$(shell uname) - ifeq ($(OS),) - $(error "Cannot detect operating system") - endif - export os_name=$(OS) - endif - - ifeq ($(OS), Windows_NT) - export os_name=windows - endif - ifeq ($(OS), Linux) - export os_name=linux - endif - ifeq ($(OS), Darwin) - export os_name=macos - endif -endif - -export compiler?=clang -export arch?=ia32 -export target?=android - -ifeq (ia32,$(arch)) - APP_ABI:=x86 - export TRIPLE:=i686-linux-android -else ifeq (intel64,$(arch)) - APP_ABI:=x86_64 - export TRIPLE:=x86_64-linux-android -else ifeq (arm,$(arch)) - APP_ABI:=armeabi-v7a - export TRIPLE:=arm-linux-androideabi -else ifeq (arm64,$(arch)) - APP_ABI:=arm64-v8a - export TRIPLE:=aarch64-linux-android -else - APP_ABI:=$(arch) -endif - -api_version?=21 -export API_LEVEL:=$(api_version) -APP_PLATFORM:=android-$(api_version) - -ifeq (clang,$(compiler)) - NDK_TOOLCHAIN_VERSION:=clang - APP_STL:=c++_shared -else - NDK_TOOLCHAIN_VERSION:=4.9 -endif Index: pstl/trunk/build/macos.inc =================================================================== --- pstl/trunk/build/macos.inc +++ pstl/trunk/build/macos.inc @@ -1,9 +0,0 @@ -#===-- macos.inc ---------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -DYN_LDFLAGS += -Wl,-rpath,$(TBBROOT)/lib Index: pstl/trunk/build/mingw.inc =================================================================== --- pstl/trunk/build/mingw.inc +++ pstl/trunk/build/mingw.inc @@ -1,49 +0,0 @@ -#===-- mingw.inc ---------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -PYTHON = python -KEY = - -QKEY = $(KEY)q -FKEY = $(KEY) -FQKEY = $(KEY) -MACHINE_KEY = $(KEY)m -OBJ_SFX = .o -DEL_CMD = del /F -RUN_CMD = -COMMAND_SEPARATOR = & -compiler ?= gcc -COMPILER_NOLOGO_KEY = -OPTIMIZATION_DISABLED_FLAGS = $(KEY)Og $(KEY)g -OPTIMIZATION_ENABLED_FLAGS += $(KEY)O2 -TBB_LIB_NAME = tbb -CPLUS = $(compiler) -LD = $(CPLUS) - -USE_SHARED_CPPRUNTIME_KEY = -LINK_KEY = $(KEY)l - -LD_OUT_KEY = $(KEY)o -DYN_LDFLAGS += -L. -L$(proj_root)/build - -ifneq ($(PSTL_LIB_NAME), ) - PSTL_LIB_LINK += $(LINK_KEY)$(PSTL_LIB_NAME)$(PSTL_LIB_EXT) -endif - -ifeq ($(backend),tbb) - DYN_LDFLAGS += $(LINK_KEY)$(TBB_LIB_NAME) -endif - -ifeq ($(arch),intel64) - PSTL_ARCH = $(MACHINE_KEY)64 -else ifeq ($(arch),ia32) - PSTL_ARCH = $(MACHINE_KEY)32 -else ifeq ($(arch),) - $(info arch=native by default) -else - PSTL_ARCH = $(MACHINE_KEY)$(arch) -endif Index: pstl/trunk/build/unix.inc =================================================================== --- pstl/trunk/build/unix.inc +++ pstl/trunk/build/unix.inc @@ -1,50 +0,0 @@ -#===-- unix.inc ----------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -PYTHON = python -KEY = - -QKEY = $(KEY)q -FKEY = $(KEY) -FQKEY = $(KEY) -MACHINE_KEY = $(KEY)m -OBJ_SFX = .o -DEL_CMD = rm $(KEY)f -RUN_CMD = ./ -COMMAND_SEPARATOR = ; -compiler ?= icc -COMPILER_NOLOGO_KEY = -OPTIMIZATION_DISABLED_FLAGS = $(KEY)O0 $(KEY)g -OPTIMIZATION_ENABLED_FLAGS += $(KEY)O2 -TBB_LIB_NAME = tbb -CPLUS = $(compiler) -LD = $(CPLUS) - -USE_SHARED_CPPRUNTIME_KEY = -LINK_KEY = $(KEY)l - -LD_OUT_KEY = $(KEY)o -DYN_LDFLAGS += -L. -L$(proj_root)/build - -ifneq ($(PSTL_LIB_NAME), ) - PSTL_LIB_LINK += $(LINK_KEY)$(PSTL_LIB_NAME)$(PSTL_LIB_EXT) -endif - -ifeq ($(backend), tbb) - DYN_LDFLAGS += $(LINK_KEY)$(TBB_LIB_NAME) -endif - - -ifeq ($(arch),intel64) - PSTL_ARCH = $(MACHINE_KEY)64 -else ifeq ($(arch),ia32) - PSTL_ARCH = $(MACHINE_KEY)32 -else ifeq ($(arch),) - $(info arch=native by default) -else - PSTL_ARCH = $(MACHINE_KEY)$(arch) -endif Index: pstl/trunk/build/windows.inc =================================================================== --- pstl/trunk/build/windows.inc +++ pstl/trunk/build/windows.inc @@ -1,53 +0,0 @@ -#===-- windows.inc -------------------------------------------------------===## -# -# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -# -#===----------------------------------------------------------------------===## - -PYTHON = python -compiler ?= icl -LD = LINK -KEY = / -LINK_KEY = -QKEY = $(KEY)Q -FKEY = $(KEY)F -FQKEY = $(QKEY) -MACHINE_KEY = $(QKEY) -OBJ_SFX = .obj -DEL_CMD = del $(KEY)F -RUN_CMD = -COMMAND_SEPARATOR = & -COMPILER_NOLOGO_KEY = $(KEY)nologo -OPTIMIZATION_DISABLED_FLAGS = $(KEY)Od $(KEY)Zi $(KEY)DEBUG $(KEY)Fd"$*.pdb" -OPTIMIZATION_ENABLED_FLAGS = $(KEY)O2 $(KEY)DNDEBUG -LD_OUT_KEY = $(KEY)OUT: - -ifneq ($(PSTL_LIB_NAME), ) - PSTL_LIB_EXT = .lib - PSTL_LIB_LINK += $(LINK_KEY)$(PSTL_LIB_NAME)$(PSTL_LIB_EXT) -endif -# Do not update LDFLAGS with corresponding TBB_LIB_NAME here, because of -# implicit linkage capability of TBB library - -ifeq ($(cfg),debug) - LINK_KEY += $(KEY)debug - USE_SHARED_CPPRUNTIME_KEY += $(KEY)MDd $(KEY)EHsc - BACKEND_MACRO += -DTBB_USE_DEBUG=1 -else - USE_SHARED_CPPRUNTIME_KEY += $(KEY)MD $(KEY)EHsc -endif - -ifneq (, $(filter $(compiler), cl icl)) - CPLUS_FLAGS += $(KEY)bigobj -endif - - -DYN_LDFLAGS += $(LINK_KEY) - -ifneq (,$(filter uwp,$(target_app) $(target_ui))) - CPLUS_FLAGS += /ZW:nostdlib /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" - _WIN32_WINNT = 0x0A00 - DYN_LDFLAGS += /NODEFAULTLIB:"kernel32.lib" OneCore.lib -endif