Skip to content

Usage of -fno-pch-timestamp breaks clang builds on macOS 10.7–10.11 #205

Open
@barracuda156

Description

@barracuda156

Build log: https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/271191/steps/install-port/logs/stdio

The problem is created by this chunk of code:

elseif (_compilerID MATCHES "Clang")
if (UNIX)
# Clang options used
# -x specify the source language
# -c compile but do not link
# -o place output in file
# -fno-pch-timestamp disable inclusion of timestamp in precompiled headers (clang 4.0.0+)
set (_xLanguage_C "c-header")
set (_xLanguage_CXX "c++-header")
if (_flags)
# append to list
list (APPEND _flags -x "${_xLanguage_${_language}}" -c "${_prefixFile}" -o "${_pchFile}")
if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0")
list (APPEND _flags -Xclang -fno-pch-timestamp)
endif()
else()
# return as a flag string
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
if (NOT "${_compilerVersion}" VERSION_LESS "4.0.0")
set (_flags "${_flags} -Xclang -fno-pch-timestamp")
endif()
endif()

Apparently Clang version threshold is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions