Skip to content

Commit 0adfe83

Browse files
committed
deps: update cpu_features to 545b2e84ec68f4364be1e89309a1404575689226
1 parent 5f5bf30 commit 0adfe83

File tree

5 files changed

+4
-42
lines changed

5 files changed

+4
-42
lines changed

deps/cpu_features/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ endif(NOT CMAKE_BUILD_TYPE)
2323
# As a consequence it is discouraged to use cpu_features as a shared library because different compilers may interpret the code in different ways.
2424
# Prefer static linking from source whenever possible.
2525
option(BUILD_SHARED_LIBS "Build library as shared." OFF)
26-
# PIC
27-
option(BUILD_PIC "Build with Position Independant Code." OFF) # Default is off at least for GCC
2826

2927
# Force PIC on unix when building shared libs
3028
# see: https://en.wikipedia.org/wiki/Position-independent_code
3129
if(BUILD_SHARED_LIBS AND UNIX)
32-
set(BUILD_PIC ON)
30+
option(CMAKE_POSITION_INDEPENDENT_CODE "Build with Position Independant Code." ON)
3331
endif()
3432

3533
include(CheckIncludeFile)
@@ -101,7 +99,6 @@ add_library(utils OBJECT
10199
${PROJECT_SOURCE_DIR}/src/stack_line_reader.c
102100
${PROJECT_SOURCE_DIR}/src/string_view.c
103101
)
104-
set_property(TARGET utils PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_PIC})
105102
setup_include_and_definitions(utils)
106103

107104
#
@@ -122,7 +119,6 @@ if(UNIX)
122119
if(HAVE_STRONG_GETAUXVAL)
123120
target_compile_definitions(unix_based_hardware_detection PRIVATE HAVE_STRONG_GETAUXVAL)
124121
endif()
125-
set_property(TARGET unix_based_hardware_detection PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_PIC})
126122
endif()
127123

128124
#
@@ -139,7 +135,6 @@ add_library(cpu_features ${CPU_FEATURES_HDRS} ${CPU_FEATURES_SRCS})
139135
set_target_properties(cpu_features PROPERTIES PUBLIC_HEADER "${CPU_FEATURES_HDRS}")
140136
setup_include_and_definitions(cpu_features)
141137
target_link_libraries(cpu_features PUBLIC ${CMAKE_DL_LIBS})
142-
set_property(TARGET cpu_features PROPERTY POSITION_INDEPENDENT_CODE ${BUILD_PIC})
143138
target_include_directories(cpu_features
144139
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/cpu_features>
145140
)

deps/cpu_features/cpu_features.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
],
7878
'defines': [
7979
# Manually-tracked git revision
80-
'CPU_FEATURES_VERSION_REV=cf589a28444eadf01fc94fd7afaf517be2cf9774',
80+
'CPU_FEATURES_VERSION_REV=545b2e84ec68f4364be1e89309a1404575689226',
8181
],
8282
},
8383
},

deps/cpu_features/src/cpuinfo_x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
#else
111111
#error "Unsupported OS"
112112
#endif // CPU_FEATURES_OS
113+
113114
#include "internal/string_view.h"
114115

115116
////////////////////////////////////////////////////////////////////////////////
@@ -1698,11 +1699,10 @@ void FillX86BrandString(char brand_string[49]) {
16981699
SafeCpuId(max_cpuid_leaf_ext, 0x80000003),
16991700
SafeCpuId(max_cpuid_leaf_ext, 0x80000004),
17001701
};
1701-
const size_t leaves_size = sizeof(leaves);
17021702
#if __STDC_VERSION__ >= 201112L
17031703
_Static_assert(sizeof(leaves) == 48, "Leaves must be packed");
17041704
#endif
1705-
CpuFeatures_StringView_CopyString(view((const char*)leaves, leaves_size),
1705+
CpuFeatures_StringView_CopyString(view((const char*)leaves, sizeof(leaves)),
17061706
brand_string, 49);
17071707
}
17081708

deps/fix-compile-macos-windows.patch

Lines changed: 0 additions & 20 deletions
This file was deleted.

deps/fix-compile-macos.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)