Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build fixes #859

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,15 @@ windows-debug-configure: clean

windows-debug: windows-debug-configure
$(MAKE) -C '$(BUILD_ROOT)'
cp '$(BUILD_ROOT)/lokinet.exe' '$(REPO)/lokinet.exe'
cp '$(BUILD_ROOT)/daemon/lokinet.exe' '$(REPO)/lokinet.exe'

windows-release-configure: clean
mkdir -p '$(BUILD_ROOT)'
$(CONFIG_CMD_WINDOWS) -DCMAKE_TOOLCHAIN_FILE='$(REPO)/contrib/cross/mingw.cmake' -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DCMAKE_ASM_FLAGS='$(ASFLAGS)' -DCMAKE_C_FLAGS='$(CFLAGS)' -DCMAKE_CXX_FLAGS='$(CXXFLAGS)'

windows-release: windows-release-configure
$(MAKE) -C '$(BUILD_ROOT)'
cp '$(BUILD_ROOT)/lokinet.exe' '$(REPO)/lokinet.exe'
cp '$(BUILD_ROOT)/daemon/lokinet.exe' '$(REPO)/lokinet.exe'

windows: windows-debug

Expand Down
2 changes: 1 addition & 1 deletion cmake/win32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(NOT MSVC_VERSION)
add_definitions(-DWINVER=0x0500 -D_WIN32_WINNT=0x0500)
# Wait a minute, if we're not Microsoft C++, nor a Clang paired with Microsoft C++,
# then the only possible option has to be GNU or a GNU-linked Clang!
set(FS_LIB stdc++fs)
# set(FS_LIB stdc++fs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why tho

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest mingw ships with a non-broken stdlib

Copy link
Contributor

@despair86 despair86 Oct 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok apparently only mainstream targets get this special treatment (pretty much Linux/macOS/Windows)

t. builds on a bunch of niche, arcane, yet up to date platforms that still ship a separate c++17 filesystem ts lib even at GCC 9 (BSDs...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap it around a library check or version check at least

endif()

if(EMBEDDED_CFG)
Expand Down
4 changes: 2 additions & 2 deletions daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ else()
add_executable(${EXE} ${EXE_SRC})
add_executable(lokinet-rcutil rcutil.cpp)
elseif(NOT MSVC_VERSION)
add_executable(${EXE} ${EXE_SRC} llarp/win32/version.rc)
add_executable(lokinet-rcutil rcutil.cpp llarp/win32/version.rc)
add_executable(${EXE} ${EXE_SRC} ../llarp/win32/version.rc)
add_executable(lokinet-rcutil rcutil.cpp ../llarp/win32/version.rc)
else()
add_executable(${EXE} ${EXE_SRC})
add_executable(lokinet-rcutil rcutil.cpp)
Expand Down
2 changes: 1 addition & 1 deletion libabyss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ elseif(MSVC_VERSION)
add_executable(${ABYSS_EXE} main.cpp)
target_link_libraries(${ABYSS_EXE} PUBLIC ${ABYSS_LIB} ${STATIC_LIB} ws2_32)
elseif(NOT CMAKE_SYSTEM_NAME STREQUAL iOS)
add_executable(${ABYSS_EXE} main.cpp llarp/win32/abyss.rc)
add_executable(${ABYSS_EXE} main.cpp ../llarp/win32/abyss.rc)
target_link_libraries(${ABYSS_EXE} PUBLIC ${ABYSS_LIB} ${STATIC_LIB} ws2_32)
endif()

Expand Down