Skip to content

Commit 584e85f

Browse files
committed
Merge branch 'ver/1.21.1' into feature/dfc-v0
# Conflicts: # c2me-opts-natives-math/src/c/CMakeLists.txt
2 parents 8fcfbc6 + 4e1e671 commit 584e85f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

c2me-opts-natives-math/src/c/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ endif()
2424
execute_process(COMMAND llvm-config --prefix OUTPUT_VARIABLE LLVM_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
2525

2626
target_include_directories(c2me-opts-natives-math PRIVATE includes/)
27-
target_compile_options(c2me-opts-natives-math PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wall -Wextra -Wpedantic -ffreestanding -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. -fdebug-compilation-dir=. -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=. -fdebug-prefix-map=${LLVM_PREFIX}=.../llvm-prefix -fno-math-errno -mprefer-vector-width=512 -ffp-contract=off -Rpass-analysis=loop-vectorize -mno-stack-arg-probe -fsave-optimization-record "SHELL:-mllvm -slp-vectorize-hor-store" "SHELL:-mllvm -slp-min-tree-size=1" "SHELL:-mllvm -slp-min-reg-size=64" "SHELL:-mllvm -slp-threshold=-1" "SHELL:-mllvm -enable-epilogue-vectorization">)
27+
target_compile_options(c2me-opts-natives-math PRIVATE $<$<COMPILE_LANGUAGE:C>:-Wall -Wextra -Wpedantic -ffreestanding -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. -fdebug-compilation-dir=. -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=. -fdebug-prefix-map=${LLVM_PREFIX}=.../llvm-prefix -fno-math-errno -mprefer-vector-width=512 -ffp-contract=off -Rpass-analysis=loop-vectorize -mno-stack-arg-probe -fsave-optimization-record "SHELL:-mllvm -extra-vectorizer-passes" "SHELL:-mllvm -slp-vectorize-hor-store" "SHELL:-mllvm -slp-min-tree-size=1" "SHELL:-mllvm -slp-min-reg-size=64" "SHELL:-mllvm -slp-threshold=-1" "SHELL:-mllvm -enable-epilogue-vectorization">)
2828
target_link_options(c2me-opts-natives-math PRIVATE -nostdlib -fuse-ld=lld -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. -fdebug-compilation-dir=. -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=. -fdebug-prefix-map=${LLVM_PREFIX}=.../llvm-prefix)

c2me-opts-natives-math/src/main/java/com/ishland/c2me/opts/natives_math/ModuleEntryPoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class ModuleEntryPoint {
2727
boolean actuallyEnabled = false;
2828
if (configured) {
2929
try {
30-
actuallyEnabled = Class.forName("com.ishland.c2me.opts.natives_math.common.NativeLoader").getField("linker").get(null) != null;
30+
actuallyEnabled = Class.forName("com.ishland.c2me.opts.natives_math.common.NativeLoader").getField("lookup").get(null) != null;
3131
} catch (Throwable t) {
3232
t.printStackTrace();
3333
}

c2me-opts-natives-math/src/main/java/com/ishland/c2me/opts/natives_math/common/NativeLoader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ private static SymbolLookup load0(String libName) {
6262
// load from resources
6363
try (final InputStream in = NativeLoader.class.getClassLoader().getResourceAsStream(libName)) {
6464
if (in == null) {
65-
throw new IOException("Cannot find native library " + libName);
65+
LOGGER.warn("Cannot find native library {}, possibly unsupported platform for native acceleration", libName);
66+
return null;
6667
}
6768
final Path tempFile;
6869
if (Boolean.getBoolean("vectorizedgen.preserveNative")) {

0 commit comments

Comments
 (0)