Skip to content

Commit 4e82535

Browse files
authored
Merge pull request #20860 from hrydgard/build-armips-in-libretro
Build armips in libretro builds
2 parents e53d6e4 + b304fbe commit 4e82535

File tree

11 files changed

+70
-48
lines changed

11 files changed

+70
-48
lines changed

CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ option(USE_LIBNX "Set to ON to build for Switch(libnx)" OFF)
193193
option(USE_FFMPEG "Build with FFMPEG support" ON)
194194
option(USE_DISCORD "Build with Discord support" ON)
195195
option(USE_MINIUPNPC "Build with miniUPnPc support" ON)
196-
option(USE_ARMIPS "Build with armips support in API/debuggerdebugger" ON)
197196
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
198197
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
199198
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
@@ -2147,7 +2146,7 @@ add_library(${CoreLibName} ${CoreLinkType}
21472146
Core/Dialog/SavedataParam.h
21482147
Core/ELF/ElfReader.cpp
21492148
Core/ELF/ElfReader.h
2150-
Core/ELF/ElfTypes.h
2149+
Core/ELF/PSPElfTypes.h
21512150
Core/ELF/PBPReader.cpp
21522151
Core/ELF/PBPReader.h
21532152
Core/ELF/PrxDecrypter.cpp
@@ -2475,11 +2474,7 @@ if(ANDROID)
24752474
endif()
24762475
endif()
24772476

2478-
if(USE_ARMIPS)
2479-
set(CoreExtraLibs ${CoreExtraLibs} armips)
2480-
else()
2481-
add_compile_definitions(NO_ARMIPS=1)
2482-
endif()
2477+
set(CoreExtraLibs ${CoreExtraLibs} armips)
24832478

24842479
# needed for VK_USE_PLATFORM_XCB_KHR only
24852480
#if(VULKAN AND NOT WIN32)

Core/Core.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@
10961096
<ClInclude Include="Dialog\PSPScreenshotDialog.h" />
10971097
<ClInclude Include="Dialog\SavedataParam.h" />
10981098
<ClInclude Include="ELF\ElfReader.h" />
1099-
<ClInclude Include="ELF\ElfTypes.h" />
1099+
<ClInclude Include="ELF\PSPElfTypes.h" />
11001100
<ClInclude Include="ELF\ParamSFO.h" />
11011101
<ClInclude Include="ELF\PBPReader.h" />
11021102
<ClInclude Include="ELF\PrxDecrypter.h" />
@@ -1348,4 +1348,4 @@
13481348
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
13491349
<ImportGroup Label="ExtensionTargets">
13501350
</ImportGroup>
1351-
</Project>
1351+
</Project>

Core/Core.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@
13981398
<ClInclude Include="ELF\ElfReader.h">
13991399
<Filter>ELF</Filter>
14001400
</ClInclude>
1401-
<ClInclude Include="ELF\ElfTypes.h">
1401+
<ClInclude Include="ELF\PSPElfTypes.h">
14021402
<Filter>ELF</Filter>
14031403
</ClInclude>
14041404
<ClInclude Include="MIPS\MIPSDebugInterface.h">

Core/Debugger/SymbolMap.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131

3232
#include <algorithm>
3333
#include <memory>
34-
#ifndef NO_ARMIPS
3534
#include <string_view>
36-
#endif
3735
#include <unordered_map>
3836

3937
#include "zlib.h"
@@ -46,20 +44,7 @@
4644
#include "Core/MemMap.h"
4745
#include "Core/Config.h"
4846
#include "Core/Debugger/SymbolMap.h"
49-
50-
#ifndef NO_ARMIPS
5147
#include "ext/armips/Core/Assembler.h"
52-
#else
53-
struct Identifier {
54-
explicit Identifier() {}
55-
explicit Identifier(const std::string &s) {}
56-
};
57-
58-
struct LabelDefinition {
59-
Identifier name;
60-
int64_t value;
61-
};
62-
#endif
6348

6449
SymbolMap *g_symbolMap;
6550

Core/ELF/ElfReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include <vector>
2121
#include "Common/CommonTypes.h"
22-
#include "Core/ELF/ElfTypes.h"
22+
#include "Core/ELF/PSPElfTypes.h"
2323

2424
enum {
2525
R_MIPS_NONE,

Core/MIPS/MIPSAsm.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
#include <cstdarg>
22
#include <cstring>
33
#include <memory>
4-
#ifndef NO_ARMIPS
54
#include <string_view>
6-
#endif
75
#include <vector>
86

97
#include "Common/CommonTypes.h"
10-
#ifndef NO_ARMIPS
118
#include "ext/armips/Core/Assembler.h"
129
#include "ext/armips/Core/FileManager.h"
13-
#endif
14-
1510
#include "Core/Debugger/SymbolMap.h"
1611
#include "Core/MemMapHelpers.h"
1712
#include "Core/MIPS/MIPSAsm.h"
@@ -25,7 +20,6 @@ std::string GetAssembleError()
2520
return errorText;
2621
}
2722

28-
#ifndef NO_ARMIPS
2923
class PspAssemblerFile: public AssemblerFile
3024
{
3125
public:
@@ -96,11 +90,5 @@ bool MipsAssembleOpcode(const char *line, DebugInterface *cpu, u32 address) {
9690

9791
return true;
9892
}
99-
#else
100-
bool MipsAssembleOpcode(const char *line, DebugInterface *cpu, u32 address) {
101-
errorText = "Built without armips, cannot assemble";
102-
return false;
103-
}
104-
#endif
10593

10694
} // namespace

UWP/CoreUWP/CoreUWP.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<ClInclude Include="..\..\Core\Dialog\PSPScreenshotDialog.h" />
132132
<ClInclude Include="..\..\Core\Dialog\SavedataParam.h" />
133133
<ClInclude Include="..\..\Core\ELF\ElfReader.h" />
134-
<ClInclude Include="..\..\Core\ELF\ElfTypes.h" />
134+
<ClInclude Include="..\..\Core\ELF\PSPElfTypes.h" />
135135
<ClInclude Include="..\..\Core\ELF\ParamSFO.h" />
136136
<ClInclude Include="..\..\Core\ELF\PBPReader.h" />
137137
<ClInclude Include="..\..\Core\ELF\PrxDecrypter.h" />
@@ -1032,4 +1032,4 @@
10321032
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
10331033
<ImportGroup Label="ExtensionTargets">
10341034
</ImportGroup>
1035-
</Project>
1035+
</Project>

UWP/CoreUWP/CoreUWP.vcxproj.filters

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@
458458
<ClInclude Include="..\..\Core\Dialog\PSPScreenshotDialog.h" />
459459
<ClInclude Include="..\..\Core\Dialog\SavedataParam.h" />
460460
<ClInclude Include="..\..\Core\ELF\ElfReader.h" />
461-
<ClInclude Include="..\..\Core\ELF\ElfTypes.h" />
461+
<ClInclude Include="..\..\Core\ELF\PSPElfTypes.h" />
462462
<ClInclude Include="..\..\Core\ELF\ParamSFO.h" />
463463
<ClInclude Include="..\..\Core\ELF\PBPReader.h" />
464464
<ClInclude Include="..\..\Core\ELF\PrxDecrypter.h" />

ext/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ if(WIN32)
44
set(ARMIPS_USE_STD_FILESYSTEM ON CACHE BOOL "" FORCE)
55
endif()
66

7-
if(USE_ARMIPS)
8-
add_subdirectory(armips)
9-
endif()
7+
add_subdirectory(armips)
8+
109
if(NOT USING_GLES2)
1110
add_subdirectory(glew)
1211
endif()
@@ -44,7 +43,7 @@ set(FT_REQUIRE_PNG OFF CACHE BOOL "" FORCE)
4443
set(FT_REQUIRE_HARFBUZZ OFF CACHE BOOL "" FORCE)
4544
set(FT_REQUIRE_BROTLI OFF CACHE BOOL "" FORCE)
4645
if(NOT LIBRETRO)
47-
add_subdirectory(freetype)
46+
add_subdirectory(freetype)
4847
endif()
4948

5049
if(NOT LIBRETRO)

0 commit comments

Comments
 (0)