Skip to content

Commit 91e4e26

Browse files
committed
Linux cross compile build fixes
This borrows from dotnet/runtime#104805 Signed-off-by: Joel Dice <[email protected]>
1 parent a59d6b5 commit 91e4e26

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/coreclr/jit/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function(create_standalone_jit)
9696

9797
# Only look at "our" LLVM with LLVM_CMAKE_CONFIG.
9898

99-
# set(LLVM_DIR /__w/1/s/wasm-tools/llvm-project/build-release/lib/cmake/llvm)
99+
set(LLVM_DIR $ENV{LLVM_CMAKE_CONFIG})
100100
set(CMAKE_CXX_STANDARD 17)
101101
find_package(LLVM REQUIRED CONFIG PATHS $ENV{LLVM_CMAKE_CONFIG} NO_DEFAULT_PATH)
102102
target_include_directories(${TARGETDETAILS_TARGET} PRIVATE ${LLVM_INCLUDE_DIRS})

src/coreclr/jit/compiler.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1275,8 +1275,12 @@ void DisplayNowayAssertMap()
12751275
fout = _wfopen(strJitMeasureNowayAssertFile, W("a"));
12761276
if (fout == nullptr)
12771277
{
1278+
#if !defined(HOST_WINDOWS)
1279+
// TODO: how do we print a `const char16_t*` portably?
1280+
#else
12781281
fprintf(jitstdout(), "Failed to open JitMeasureNowayAssertFile \"%ws\"\n",
12791282
strJitMeasureNowayAssertFile);
1283+
#endif
12801284
return;
12811285
}
12821286
}
@@ -1308,7 +1312,7 @@ void DisplayNowayAssertMap()
13081312

13091313
for (i = 0; i < count; i++)
13101314
{
1311-
fprintf(fout, "%u, %s, %u, \"%s\"\n", nacp[i].count, nacp[i].fl.m_file, nacp[i].fl.m_line,
1315+
fprintf(fout, "%zu, %s, %u, \"%s\"\n", nacp[i].count, nacp[i].fl.m_file, nacp[i].fl.m_line,
13121316
nacp[i].fl.m_condStr);
13131317
}
13141318

@@ -3416,7 +3420,7 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
34163420
compMaxUncheckedOffsetForNullObject = (size_t)JitConfig.JitMaxUncheckedOffset();
34173421
if (verbose)
34183422
{
3419-
printf("STRESS_NULL_OBJECT_CHECK: compMaxUncheckedOffsetForNullObject=0x%X\n",
3423+
printf("STRESS_NULL_OBJECT_CHECK: compMaxUncheckedOffsetForNullObject=0x%zX\n",
34203424
compMaxUncheckedOffsetForNullObject);
34213425
}
34223426
}
@@ -9532,7 +9536,7 @@ void dumpConvertedVarSet(Compiler* comp, VARSET_VALARG_TP vars)
95329536

95339537
bool first = true;
95349538
printf("{");
9535-
for (size_t varNum = 0; varNum < comp->lvaCount; varNum++)
9539+
for (unsigned varNum = 0; varNum < comp->lvaCount; varNum++)
95369540
{
95379541
if (pVarNumSet[varNum] == 1)
95389542
{

0 commit comments

Comments
 (0)