File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,20 +108,15 @@ option(LLAMA_BUILD_TESTS "llama: build tests"
108108option (LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE} )
109109option (LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE} )
110110option (LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE} )
111- # Deprecated: use LLAMA_BUILD_UI instead (kept for backward compat)
112- option (LLAMA_BUILD_WEBUI "llama: build the embedded Web UI for server (deprecated: use LLAMA_BUILD_UI)" ON )
113- option (LLAMA_USE_PREBUILT_WEBUI "llama: use prebuilt WebUI from HF Bucket when available (deprecated: use LLAMA_USE_PREBUILT_UI)" ON )
114-
115- # New option names
116111option (LLAMA_BUILD_UI "llama: build the embedded Web UI for server" ON )
117112option (LLAMA_USE_PREBUILT_UI "llama: use prebuilt UI from HF Bucket when available (requires LLAMA_BUILD_UI=ON)" ON )
118113
119114# Backward compat: when old var is set but new one isn't, forward the value
120- if (DEFINED LLAMA_BUILD_WEBUI AND NOT DEFINED LLAMA_BUILD_UI )
115+ if (DEFINED LLAMA_BUILD_WEBUI)
121116 set (LLAMA_BUILD_UI ${LLAMA_BUILD_WEBUI} )
122117 message (DEPRECATION "LLAMA_BUILD_WEBUI is deprecated, use LLAMA_BUILD_UI instead" )
123118endif ()
124- if (DEFINED LLAMA_USE_PREBUILT_WEBUI AND NOT DEFINED LLAMA_USE_PREBUILT_UI )
119+ if (DEFINED LLAMA_USE_PREBUILT_WEBUI)
125120 set (LLAMA_USE_PREBUILT_UI ${LLAMA_USE_PREBUILT_WEBUI} )
126121 message (DEPRECATION "LLAMA_USE_PREBUILT_WEBUI is deprecated, use LLAMA_USE_PREBUILT_UI instead" )
127122endif ()
Original file line number Diff line number Diff line change @@ -617,8 +617,6 @@ struct common_params {
617617 // UI configs
618618#ifdef LLAMA_UI_DEFAULT_ENABLED
619619 bool ui = LLAMA_UI_DEFAULT_ENABLED != 0 ;
620- #elif defined(LLAMA_WEBUI_DEFAULT_ENABLED)
621- bool ui = LLAMA_WEBUI_DEFAULT_ENABLED != 0 ;
622620#else
623621 bool ui = true ; // default to enabled when not set
624622#endif
Original file line number Diff line number Diff line change @@ -231,11 +231,10 @@ bool server_http_context::init(const common_params & params) {
231231 };
232232
233233 auto middleware_server_state = [this ](const httplib::Request & req, httplib::Response & res) {
234- (void )req; // suppress unused parameter warning when LLAMA_BUILD_UI / LLAMA_BUILD_WEBUI is not defined
234+ (void )req; // suppress unused parameter warning when LLAMA_BUILD_UI is not defined
235235 bool ready = is_ready.load ();
236236 if (!ready) {
237- // Support both old and new preprocessor defines
238- #if defined(LLAMA_BUILD_UI) || defined(LLAMA_BUILD_WEBUI)
237+ #if defined(LLAMA_BUILD_UI)
239238 auto tmp = string_split<std::string>(req.path , ' .' );
240239 if (req.path == " /" || (tmp.size () > 0 && tmp.back () == " html" )) {
241240 res.status = 503 ;
@@ -313,8 +312,7 @@ bool server_http_context::init(const common_params & params) {
313312 return 1 ;
314313 }
315314 } else {
316- // Support both old and new preprocessor defines
317- #if defined(LLAMA_BUILD_UI) || defined(LLAMA_BUILD_WEBUI)
315+ #if defined(LLAMA_BUILD_UI)
318316 // using embedded static index.html
319317 srv->Get (params.api_prefix + " /" , [](const httplib::Request & /* req*/ , httplib::Response & res) {
320318 // COEP and COOP headers, required by pyodide (python interpreter)
Original file line number Diff line number Diff line change @@ -14,12 +14,7 @@ endif()
1414set (TARGET_SRCS "" )
1515set (UI_COMPILE_DEFS "" )
1616
17- # Support both old (LLAMA_BUILD_WEBUI) and new (LLAMA_BUILD_UI) option names
18- if (LLAMA_BUILD_WEBUI OR LLAMA_BUILD_UI)
19- if (LLAMA_BUILD_WEBUI AND NOT LLAMA_BUILD_UI)
20- message (DEPRECATION "LLAMA_BUILD_WEBUI is deprecated, use LLAMA_BUILD_UI instead" )
21- endif ()
22-
17+ if (LLAMA_BUILD_UI)
2318 set (PUBLIC_ASSETS
2419 index.html
2520 bundle.js
@@ -125,19 +120,17 @@ if(LLAMA_BUILD_WEBUI OR LLAMA_BUILD_UI)
125120 endforeach ()
126121
127122 list (APPEND UI_COMPILE_DEFS
128- LLAMA_BUILD_WEBUI # Deprecated: use LLAMA_BUILD_UI
129123 LLAMA_BUILD_UI
130- LLAMA_WEBUI_DEFAULT_ENABLED=1 # Deprecated: use LLAMA_UI_DEFAULT_ENABLED
131124 LLAMA_UI_DEFAULT_ENABLED=1
132125 )
133126 message (STATUS "UI: embedded with source: ${UI_SOURCE} " )
134127 else ()
135128 message (WARNING "UI: no source available. Neither local build (build/tools/ui/dist/) nor HF Bucket download succeeded." )
136129 message (WARNING "UI: building server without embedded UI. Set LLAMA_BUILD_UI=OFF to suppress this warning." )
137- list (APPEND UI_COMPILE_DEFS LLAMA_WEBUI_DEFAULT_ENABLED=0 LLAMA_UI_DEFAULT_ENABLED=0)
130+ list (APPEND UI_COMPILE_DEFS LLAMA_UI_DEFAULT_ENABLED=0)
138131 endif ()
139132else ()
140- list (APPEND UI_COMPILE_DEFS LLAMA_WEBUI_DEFAULT_ENABLED=0 LLAMA_UI_DEFAULT_ENABLED=0)
133+ list (APPEND UI_COMPILE_DEFS LLAMA_UI_DEFAULT_ENABLED=0)
141134endif ()
142135
143136# Build the static library
You can’t perform that action at this time.
0 commit comments