zequanwu created this revision. zequanwu added reviewers: xur, davidxl, rnk. Herald added subscribers: cfe-commits, wenlei. Herald added a project: clang. zequanwu requested review of this revision.
This is intended to reduce the binary size of both phase 1 and phase 2 builds. By compiling chrome on Windows (using -Os in both phases), the binary size of phase 1 is reduced by 27.5% and binary size of phase 2 is reduced by 8.4%. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D91673 Files: clang/lib/Frontend/InitPreprocessor.cpp Index: clang/lib/Frontend/InitPreprocessor.cpp =================================================================== --- clang/lib/Frontend/InitPreprocessor.cpp +++ clang/lib/Frontend/InitPreprocessor.cpp @@ -403,6 +403,11 @@ Builder.defineMacro("__STDCPP_DEFAULT_NEW_ALIGNMENT__", Twine(TI.getNewAlign() / TI.getCharWidth()) + TI.getTypeConstantSuffix(TI.getSizeType())); + + // -- __STDCPP_THREADS__ + // Defined, and has the value integer literal 1, if and only if a + // program can have more than one thread of execution. + Builder.defineMacro("__STDCPP_THREADS__", "1"); } // In C11 these are environment macros. In C++11 they are only defined
Index: clang/lib/Frontend/InitPreprocessor.cpp =================================================================== --- clang/lib/Frontend/InitPreprocessor.cpp +++ clang/lib/Frontend/InitPreprocessor.cpp @@ -403,6 +403,11 @@ Builder.defineMacro("__STDCPP_DEFAULT_NEW_ALIGNMENT__", Twine(TI.getNewAlign() / TI.getCharWidth()) + TI.getTypeConstantSuffix(TI.getSizeType())); + + // -- __STDCPP_ÂTHREADS__ + // Defined, and has the value integer literal 1, if and only if a + // program can have more than one thread of execution. + Builder.defineMacro("__STDCPP_ÂTHREADS__", "1"); } // In C11 these are environment macros. In C++11 they are only defined
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits