<commit_before>##===- Makefile --------------------------------------------*- Makefile -*-===##
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
##===----------------------------------------------------------------------===##

# If SWIFT_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
# are being included from a subdirectory makefile.

ifndef SWIFT_LEVEL

IS_TOP_LEVEL := 1
SWIFT_LEVEL := .

DIRS := lib tools   # include docs
PARALLEL_DIRS :=

# See compiler-rt/Makefile for a description of the problems with building 
# target-side libraries with this build machinery.
SWIFT_LIBDIRS := stdlib benchmark unittests

ifeq ($(NO_RUNTIME_LIBS),1)
  # No-runtime build. No stdlib or examples. 
  $(warning Not building Swift stdlib because NO_RUNTIME_LIBS is set.)
else
  DIRS += $(SWIFT_LIBDIRS)
  ifeq ($(BUILD_EXAMPLES),1)
    PARALLEL_DIRS += examples
  endif
endif

ifeq ($(MAKECMDGOALS),libs-only)
  DIRS := $(filter-out tools docs, $(DIRS))
  OPTIONAL_DIRS :=
endif

endif


LEVEL := $(SWIFT_LEVEL)/../..
include $(LEVEL)/Makefile.common


###
# Paths to Swift tools and files

ifndef SWIFT_COMPILER
  ifeq ($(LLVM_CROSS_COMPILING),1)
    SWIFT_COMPILER := $(shell xcrun --find swift)
  else
    SWIFT_COMPILER := $(LLVMToolDir)/swift$(EXEEXT)
  endif
endif

ifndef MODULES_SDK
  ifdef SDKROOT
    MODULES_SDK := $(SDKROOT)
  else ifneq ($(findstring -darwin_ios,$(TARGET_TRIPLE)),)
    MODULES_SDK := $(shell xcrun --sdk iphoneos --show-sdk-path)
  else ifneq ($(findstring -darwin_sim,$(TARGET_TRIPLE)),)
    MODULES_SDK := $(shell xcrun --sdk iphonesimulator --show-sdk-path)
  else ifneq ($(findstring -darwin,$(TARGET_TRIPLE)),)
    MODULES_SDK := $(shell xcrun --sdk macosx --show-sdk-path)
  else
    MODULES_SDK := 
  endif
endif

ifndef SWIFT_HEADER_DIR
  SWIFT_HEADER_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/swift
endif

ifndef AXLE_SWIFT_HEADER_DIR
  AXLE_SWIFT_HEADER_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/axle
endif


###
# Settings for .swift files in Swift compiler and stdlib

# Debug symbols for .swift files
ifeq ($(DEBUG_SYMBOLS),1)
  SWIFT_DEBUGFLAG := -g
else
  SWIFT_DEBUGFLAG :=
endif

ifndef SWIFT_OPTIMIZED
  SWIFT_OPTIMIZED := 1
endif

# Optimization flags for .swift files
ifeq ($(SWIFT_OPTIMIZED),1)
  SWIFT_OPTFLAG := -O3
else
  SWIFT_OPTFLAG := -O0
endif

# All options for .swift files
SWIFT_FLAGS := $(SWIFT_DEBUGFLAG) $(SWIFT_OPTFLAG) -triple $(TARGET_TRIPLE) -I=$(SWIFT_HEADER_DIR) -sdk=$(MODULES_SDK)


###
# Settings for C files in Swift compiler and stdlib

CXX.Flags += -std=gnu++0x -Wno-nested-anon-types -Wdocumentation

CPP.Flags += -I$(PROJ_SRC_DIR)/$(SWIFT_LEVEL)/include \
             -I$(PROJ_OBJ_DIR)/$(SWIFT_LEVEL)/include \
             -I$(LLVM_SRC_ROOT)/tools/clang/include \
             -I$(LLVM_OBJ_ROOT)/tools/clang/include
ifdef SWIFT_VENDOR
CPP.Flags += -DSWIFT_VENDOR='"$(SWIFT_VENDOR) "'
endif<commit_msg>[build] Use CLANG_SRC_ROOT instead of a hardcoded path.<commit_after>##===- Makefile --------------------------------------------*- Makefile -*-===##
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
#
##===----------------------------------------------------------------------===##

# If SWIFT_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
# are being included from a subdirectory makefile.

ifndef SWIFT_LEVEL

IS_TOP_LEVEL := 1
SWIFT_LEVEL := .

DIRS := lib tools   # include docs
PARALLEL_DIRS :=

# See compiler-rt/Makefile for a description of the problems with building 
# target-side libraries with this build machinery.
SWIFT_LIBDIRS := stdlib benchmark unittests

ifeq ($(NO_RUNTIME_LIBS),1)
  # No-runtime build. No stdlib or examples. 
  $(warning Not building Swift stdlib because NO_RUNTIME_LIBS is set.)
else
  DIRS += $(SWIFT_LIBDIRS)
  ifeq ($(BUILD_EXAMPLES),1)
    PARALLEL_DIRS += examples
  endif
endif

ifeq ($(MAKECMDGOALS),libs-only)
  DIRS := $(filter-out tools docs, $(DIRS))
  OPTIONAL_DIRS :=
endif

endif


LEVEL := $(SWIFT_LEVEL)/../..
include $(LEVEL)/Makefile.common


###
# Paths to Swift tools and files

ifndef SWIFT_COMPILER
  ifeq ($(LLVM_CROSS_COMPILING),1)
    SWIFT_COMPILER := $(shell xcrun --find swift)
  else
    SWIFT_COMPILER := $(LLVMToolDir)/swift$(EXEEXT)
  endif
endif

ifndef MODULES_SDK
  ifdef SDKROOT
    MODULES_SDK := $(SDKROOT)
  else ifneq ($(findstring -darwin_ios,$(TARGET_TRIPLE)),)
    MODULES_SDK := $(shell xcrun --sdk iphoneos --show-sdk-path)
  else ifneq ($(findstring -darwin_sim,$(TARGET_TRIPLE)),)
    MODULES_SDK := $(shell xcrun --sdk iphonesimulator --show-sdk-path)
  else ifneq ($(findstring -darwin,$(TARGET_TRIPLE)),)
    MODULES_SDK := $(shell xcrun --sdk macosx --show-sdk-path)
  else
    MODULES_SDK := 
  endif
endif

ifndef SWIFT_HEADER_DIR
  SWIFT_HEADER_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/swift
endif

ifndef AXLE_SWIFT_HEADER_DIR
  AXLE_SWIFT_HEADER_DIR := $(PROJ_OBJ_ROOT)/$(BuildMode)/lib/axle
endif


###
# Settings for .swift files in Swift compiler and stdlib

# Debug symbols for .swift files
ifeq ($(DEBUG_SYMBOLS),1)
  SWIFT_DEBUGFLAG := -g
else
  SWIFT_DEBUGFLAG :=
endif

ifndef SWIFT_OPTIMIZED
  SWIFT_OPTIMIZED := 1
endif

# Optimization flags for .swift files
ifeq ($(SWIFT_OPTIMIZED),1)
  SWIFT_OPTFLAG := -O3
else
  SWIFT_OPTFLAG := -O0
endif

# All options for .swift files
SWIFT_FLAGS := $(SWIFT_DEBUGFLAG) $(SWIFT_OPTFLAG) -triple $(TARGET_TRIPLE) -I=$(SWIFT_HEADER_DIR) -sdk=$(MODULES_SDK)


###
# Settings for C files in Swift compiler and stdlib

CXX.Flags += -std=gnu++0x -Wno-nested-anon-types -Wdocumentation

CPP.Flags += -I$(PROJ_SRC_DIR)/$(SWIFT_LEVEL)/include \
             -I$(PROJ_OBJ_DIR)/$(SWIFT_LEVEL)/include
ifneq ($(CLANG_SRC_ROOT),)
CPP.Flags += -I$(CLANG_SRC_ROOT)/include \
             -I$(LLVM_OBJ_ROOT)/tools/clang/include
else
CPP.Flags += -I$(LLVM_SRC_ROOT)/tools/clang/include \
             -I$(LLVM_OBJ_ROOT)/tools/clang/include
endif
ifdef SWIFT_VENDOR
CPP.Flags += -DSWIFT_VENDOR='"$(SWIFT_VENDOR) "'
endif
{'fraction_non_alphanumeric': 0.1572845156369184, 'fraction_numerical': 0.006102212051868803, 'mean_word_length': 3.518263266712612, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '543114', 'n_tokens_mistral': 2366, 'n_tokens_neox': 2265, 'n_words': 580}