mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-19 18:11:39 -05:00
Merged PR 12483430: build console* with clang
## Why is this change being made? ## What changed? ## How was the change tested? _For more information on the code review process, see the [Code Review Guidelines & Etiquette](https://aka.ms/codereviewguidelines)._ build console* with clang Related work items: #56630064
This commit is contained in:
committed by
Dustin L. Howett
parent
7055b99acc
commit
718d7d02de
@@ -281,7 +281,7 @@ CATCH_RETURN();
|
||||
// If .AsciiChar and .UnicodeChar have the same offset (since they're a union),
|
||||
// we can just write the latter with a byte-sized value to set the former
|
||||
// _and_ simultaneously clear the upper byte of .UnicodeChar to 0. Nice!
|
||||
static_assert(offsetof(CHAR_INFO, Char.AsciiChar) == offsetof(CHAR_INFO, Char.UnicodeChar));
|
||||
static_assert(__builtin_offsetof(CHAR_INFO, Char.AsciiChar) == __builtin_offsetof(CHAR_INFO, Char.UnicodeChar));
|
||||
|
||||
// Any time we see the lead flag, we presume there will be a trailing one following it.
|
||||
// Giving us two bytes of space (one per cell in the ascii part of the character union)
|
||||
|
||||
3
src/host/exe/lto_symbols.inc
Normal file
3
src/host/exe/lto_symbols.inc
Normal file
@@ -0,0 +1,3 @@
|
||||
LLVM_LTO_EXPORTED_SYMBOLS = \
|
||||
_tlgDefineProvider_annotation__Tlgg_ConhostLauncherProviderProv \
|
||||
wWinMain \
|
||||
@@ -1,3 +1,5 @@
|
||||
!include $(BASEDIR)\onecore\windows\core\console\console_clang_feature.inc
|
||||
|
||||
!include ..\sources.inc
|
||||
# -------------------------------------
|
||||
# Windows Console
|
||||
@@ -20,6 +22,10 @@ UMTYPE = windows
|
||||
UMENTRY = wwinmain
|
||||
TARGET_DESTINATION = retail
|
||||
|
||||
!if "$(CLANG_LTO)" == "1"
|
||||
!include lto_symbols.inc
|
||||
!endif
|
||||
|
||||
# -------------------------------------
|
||||
# Build System Settings
|
||||
# -------------------------------------
|
||||
|
||||
@@ -89,10 +89,12 @@ SOURCES = \
|
||||
# Sources, Headers, and Libraries
|
||||
# -------------------------------------
|
||||
|
||||
!if "$(USE_CLANG)" != "1"
|
||||
PRECOMPILED_CXX = 1
|
||||
PRECOMPILED_INCLUDE = ..\precomp.h
|
||||
PRECOMPILED_PCH = precomp.pch
|
||||
PRECOMPILED_OBJ = precomp.obj
|
||||
!endif
|
||||
|
||||
INCLUDES = \
|
||||
$(INCLUDES); \
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
_Out_ NTSTATUS* const pReplyStatus,
|
||||
_Out_ size_t* const pNumBytes,
|
||||
_Out_ DWORD* const pControlKeyState,
|
||||
_Out_ void* const pOutputData);
|
||||
_Out_ void* const pOutputData) override;
|
||||
|
||||
private:
|
||||
SCREEN_INFORMATION& _siContext;
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
// The compiler doesn't like that. --> Suppress the warning.
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4324) // structure was padded due to alignment specifier
|
||||
// undefine BUILD_WINDOWS so that wrl/event.h doesn't include wrl/internalevent.h
|
||||
#undef BUILD_WINDOWS
|
||||
#include <wrl.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@ namespace Microsoft::Console::Interactivity::Win32
|
||||
};
|
||||
|
||||
// IConsoleControl Members
|
||||
[[nodiscard]] NTSTATUS NotifyConsoleApplication(_In_ DWORD dwProcessId);
|
||||
[[nodiscard]] NTSTATUS SetForeground(_In_ HANDLE hProcess, _In_ BOOL fForeground);
|
||||
[[nodiscard]] NTSTATUS EndTask(_In_ DWORD dwProcessId, _In_ DWORD dwEventType, _In_ ULONG ulCtrlFlags);
|
||||
[[nodiscard]] NTSTATUS NotifyConsoleApplication(_In_ DWORD dwProcessId) override;
|
||||
[[nodiscard]] NTSTATUS SetForeground(_In_ HANDLE hProcess, _In_ BOOL fForeground) override;
|
||||
[[nodiscard]] NTSTATUS EndTask(_In_ DWORD dwProcessId, _In_ DWORD dwEventType, _In_ ULONG ulCtrlFlags) override;
|
||||
[[nodiscard]] NTSTATUS SetWindowOwner(HWND hwnd, DWORD processId, DWORD threadId) noexcept override;
|
||||
|
||||
// Public Members
|
||||
|
||||
Reference in New Issue
Block a user