glsl: Remove builtin_compiler from the build system.
We don't actually use anything from builtin_function.cpp, so we don't need to generate it anymore. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
76d2f73643
commit
c845140a20
|
@ -2103,7 +2103,6 @@ AC_CONFIG_FILES([Makefile
|
||||||
src/gbm/Makefile
|
src/gbm/Makefile
|
||||||
src/gbm/main/gbm.pc
|
src/gbm/main/gbm.pc
|
||||||
src/glsl/Makefile
|
src/glsl/Makefile
|
||||||
src/glsl/builtin_compiler/Makefile
|
|
||||||
src/glx/Makefile
|
src/glx/Makefile
|
||||||
src/glx/tests/Makefile
|
src/glx/tests/Makefile
|
||||||
src/gtest/Makefile
|
src/gtest/Makefile
|
||||||
|
|
|
@ -3,6 +3,4 @@ glsl_lexer.cpp
|
||||||
glsl_parser.cpp
|
glsl_parser.cpp
|
||||||
glsl_parser.h
|
glsl_parser.h
|
||||||
glsl_parser.output
|
glsl_parser.output
|
||||||
builtin_function.cpp
|
|
||||||
builtincompiler
|
|
||||||
glsl_test
|
glsl_test
|
||||||
|
|
|
@ -49,32 +49,6 @@ include $(LOCAL_PATH)/Android.gen.mk
|
||||||
include $(MESA_COMMON_MK)
|
include $(MESA_COMMON_MK)
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
include $(BUILD_STATIC_LIBRARY)
|
||||||
|
|
||||||
# ---------------------------------------
|
|
||||||
# Build mesa_builtin_compiler for host
|
|
||||||
# ---------------------------------------
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(LIBGLCPP_FILES) \
|
|
||||||
$(LIBGLSL_FILES) \
|
|
||||||
$(BUILTIN_COMPILER_CXX_FILES) \
|
|
||||||
$(GLSL_COMPILER_CXX_FILES)
|
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := \
|
|
||||||
$(MESA_TOP)/src/mapi \
|
|
||||||
$(MESA_TOP)/src/mesa
|
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := libmesa_glsl_utils
|
|
||||||
|
|
||||||
LOCAL_MODULE := mesa_builtin_compiler
|
|
||||||
|
|
||||||
LOCAL_MODULE_CLASS := EXECUTABLES
|
|
||||||
LOCAL_IS_HOST_MODULE := true
|
|
||||||
include $(LOCAL_PATH)/Android.gen.mk
|
|
||||||
include $(MESA_COMMON_MK)
|
|
||||||
include $(BUILD_HOST_EXECUTABLE)
|
|
||||||
|
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Build glsl_compiler
|
# Build glsl_compiler
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
# IN THE SOFTWARE.
|
# IN THE SOFTWARE.
|
||||||
|
|
||||||
SUBDIRS = builtin_compiler
|
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/src/mapi \
|
-I$(top_srcdir)/src/mapi \
|
||||||
|
@ -72,31 +70,21 @@ tests_ralloc_test_LDADD = \
|
||||||
$(top_builddir)/src/gtest/libgtest.la \
|
$(top_builddir)/src/gtest/libgtest.la \
|
||||||
$(PTHREAD_LIBS)
|
$(PTHREAD_LIBS)
|
||||||
|
|
||||||
if CROSS_COMPILING
|
|
||||||
libglcpp_la_SOURCES = \
|
libglcpp_la_SOURCES = \
|
||||||
glcpp/glcpp-lex.c \
|
glcpp/glcpp-lex.c \
|
||||||
glcpp/glcpp-parse.c \
|
glcpp/glcpp-parse.c \
|
||||||
$(LIBGLCPP_FILES)
|
$(LIBGLCPP_FILES)
|
||||||
else
|
|
||||||
libglcpp_la_LIBADD = builtin_compiler/libglcpp.la
|
|
||||||
endif
|
|
||||||
|
|
||||||
glcpp_glcpp_SOURCES = \
|
glcpp_glcpp_SOURCES = \
|
||||||
glcpp/glcpp.c \
|
glcpp/glcpp.c \
|
||||||
$(top_srcdir)/src/mesa/program/prog_hash_table.c
|
$(top_srcdir)/src/mesa/program/prog_hash_table.c
|
||||||
glcpp_glcpp_LDADD = libglcpp.la
|
glcpp_glcpp_LDADD = libglcpp.la
|
||||||
|
|
||||||
libglsl_la_SOURCES = builtin_function.cpp
|
|
||||||
libglsl_la_LIBADD = libglcpp.la
|
libglsl_la_LIBADD = libglcpp.la
|
||||||
if CROSS_COMPILING
|
libglsl_la_SOURCES = \
|
||||||
libglsl_la_SOURCES += \
|
|
||||||
glsl_lexer.cpp \
|
glsl_lexer.cpp \
|
||||||
glsl_parser.cpp \
|
glsl_parser.cpp \
|
||||||
$(LIBGLSL_FILES)
|
$(LIBGLSL_FILES)
|
||||||
else
|
|
||||||
libglsl_la_LIBADD += \
|
|
||||||
builtin_compiler/libglslcore.la
|
|
||||||
endif
|
|
||||||
|
|
||||||
glsl_test_SOURCES = \
|
glsl_test_SOURCES = \
|
||||||
$(top_srcdir)/src/mesa/main/hash_table.c \
|
$(top_srcdir)/src/mesa/main/hash_table.c \
|
||||||
|
@ -168,6 +156,3 @@ CLEANFILES = \
|
||||||
glcpp/glcpp-parse.h \
|
glcpp/glcpp-parse.h \
|
||||||
glsl_parser.h \
|
glsl_parser.h \
|
||||||
$(BUILT_SOURCES)
|
$(BUILT_SOURCES)
|
||||||
|
|
||||||
builtin_function.cpp: $(srcdir)/builtins/profiles/* $(srcdir)/builtins/ir/* $(srcdir)/builtins/glsl/* $(srcdir)/builtins/tools/generate_builtins.py $(srcdir)/builtins/tools/texture_builtins.py $(builddir)/builtin_compiler/builtin_compiler$(BUILD_EXEEXT)
|
|
||||||
$(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/builtins/tools/generate_builtins.py $(builddir)/builtin_compiler/builtin_compiler$(BUILD_EXEEXT) > builtin_function.cpp || rm -f builtin_function.cpp
|
|
||||||
|
|
|
@ -105,20 +105,7 @@ GLSL_COMPILER_CXX_FILES = \
|
||||||
$(GLSL_SRCDIR)/standalone_scaffolding.cpp \
|
$(GLSL_SRCDIR)/standalone_scaffolding.cpp \
|
||||||
$(GLSL_SRCDIR)/main.cpp
|
$(GLSL_SRCDIR)/main.cpp
|
||||||
|
|
||||||
# builtin_compiler
|
|
||||||
#
|
|
||||||
# This is built before libglsl to generate builtin_function.cpp for libglsl.
|
|
||||||
# For this to work, a dummy version of builtin_function.cpp,
|
|
||||||
# builtin_stubs.cpp, is used.
|
|
||||||
|
|
||||||
BUILTIN_COMPILER_CXX_FILES = \
|
|
||||||
$(GLSL_SRCDIR)/builtin_compiler/builtin_stubs.cpp
|
|
||||||
|
|
||||||
BUILTIN_COMPILER_GENERATED_CXX_FILES = \
|
|
||||||
$(GLSL_BUILDDIR)/glsl_lexer.cpp \
|
|
||||||
$(GLSL_BUILDDIR)/glsl_parser.cpp
|
|
||||||
|
|
||||||
# libglsl generated sources
|
# libglsl generated sources
|
||||||
LIBGLSL_GENERATED_CXX_FILES = \
|
LIBGLSL_GENERATED_CXX_FILES = \
|
||||||
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
|
$(GLSL_BUILDDIR)/glsl_lexer.cpp \
|
||||||
$(GLSL_BUILDDIR)/builtin_function.cpp
|
$(GLSL_BUILDDIR)/glsl_parser.cpp
|
||||||
|
|
|
@ -53,55 +53,25 @@ if env['msvc']:
|
||||||
env.Prepend(CPPPATH = ['#/src/getopt'])
|
env.Prepend(CPPPATH = ['#/src/getopt'])
|
||||||
env.PrependUnique(LIBS = [getopt])
|
env.PrependUnique(LIBS = [getopt])
|
||||||
|
|
||||||
if env['crosscompile'] and not env['embedded']:
|
# Copy these files to avoid generation object files into src/mesa/program
|
||||||
Import('builtin_glsl_function')
|
env.Prepend(CPPPATH = ['#src/mesa/main'])
|
||||||
else:
|
env.Command('hash_table.c', '#src/mesa/main/hash_table.c', Copy('$TARGET', '$SOURCE'))
|
||||||
# Copy these files to avoid generation object files into src/mesa/program
|
env.Command('imports.c', '#src/mesa/main/imports.c', Copy('$TARGET', '$SOURCE'))
|
||||||
env.Prepend(CPPPATH = ['#src/mesa/main'])
|
# Copy these files to avoid generation object files into src/mesa/program
|
||||||
env.Command('hash_table.c', '#src/mesa/main/hash_table.c', Copy('$TARGET', '$SOURCE'))
|
env.Prepend(CPPPATH = ['#src/mesa/program'])
|
||||||
env.Command('imports.c', '#src/mesa/main/imports.c', Copy('$TARGET', '$SOURCE'))
|
env.Command('prog_hash_table.c', '#src/mesa/program/prog_hash_table.c', Copy('$TARGET', '$SOURCE'))
|
||||||
# Copy these files to avoid generation object files into src/mesa/program
|
env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE'))
|
||||||
env.Prepend(CPPPATH = ['#src/mesa/program'])
|
|
||||||
env.Command('prog_hash_table.c', '#src/mesa/program/prog_hash_table.c', Copy('$TARGET', '$SOURCE'))
|
|
||||||
env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE'))
|
|
||||||
|
|
||||||
compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_FILES'])
|
compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_FILES'])
|
||||||
|
|
||||||
mesa_objs = env.StaticObject([
|
mesa_objs = env.StaticObject([
|
||||||
'hash_table.c',
|
'hash_table.c',
|
||||||
'imports.c',
|
'imports.c',
|
||||||
'prog_hash_table.c',
|
'prog_hash_table.c',
|
||||||
'symbol_table.c',
|
'symbol_table.c',
|
||||||
])
|
])
|
||||||
|
|
||||||
compiler_objs += mesa_objs
|
compiler_objs += mesa_objs
|
||||||
|
|
||||||
builtin_compiler = env.Program(
|
|
||||||
target = 'builtin_compiler/builtin_compiler',
|
|
||||||
source = compiler_objs + glsl_sources + \
|
|
||||||
source_lists['BUILTIN_COMPILER_CXX_FILES'],
|
|
||||||
)
|
|
||||||
|
|
||||||
# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll
|
|
||||||
# depends on glsl_parser.h
|
|
||||||
env.Depends(builtin_compiler, glsl_parser)
|
|
||||||
|
|
||||||
builtin_glsl_function = env.CodeGenerate(
|
|
||||||
target = 'builtin_function.cpp',
|
|
||||||
script = 'builtins/tools/generate_builtins.py',
|
|
||||||
source = builtin_compiler,
|
|
||||||
command = python_cmd + ' $SCRIPT $SOURCE > $TARGET'
|
|
||||||
)
|
|
||||||
|
|
||||||
env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', '#src/glsl/builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
|
|
||||||
|
|
||||||
Export('builtin_glsl_function')
|
|
||||||
|
|
||||||
if env['hostonly']:
|
|
||||||
Return()
|
|
||||||
|
|
||||||
|
|
||||||
glsl_sources += builtin_glsl_function
|
|
||||||
|
|
||||||
glsl = env.ConvenienceLibrary(
|
glsl = env.ConvenienceLibrary(
|
||||||
target = 'glsl',
|
target = 'glsl',
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
builtin_compiler
|
|
||||||
glcpp-lex.c
|
|
||||||
glcpp-parse.c
|
|
||||||
glcpp-parse.h
|
|
||||||
glcpp-parse.output
|
|
|
@ -1,98 +0,0 @@
|
||||||
# Copyright © 2012 Jon TURNEY
|
|
||||||
# Copyright © 2012 Thierry Reding
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
|
||||||
# to deal in the Software without restriction, including without limitation
|
|
||||||
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
# and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
# Software is furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice (including the next
|
|
||||||
# paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
# Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
# IN THE SOFTWARE.
|
|
||||||
|
|
||||||
AM_CFLAGS = \
|
|
||||||
-I $(top_srcdir)/include \
|
|
||||||
-I $(top_srcdir)/src/mapi \
|
|
||||||
-I $(top_srcdir)/src/mesa \
|
|
||||||
-I $(GLSL_SRCDIR) \
|
|
||||||
-I $(GLSL_SRCDIR)/glcpp \
|
|
||||||
-I $(GLSL_BUILDDIR) \
|
|
||||||
$(VISIBILITY_CFLAGS)
|
|
||||||
|
|
||||||
if CROSS_COMPILING
|
|
||||||
proxyCC = @CC_FOR_BUILD@
|
|
||||||
proxyCFLAGS = @CFLAGS_FOR_BUILD@
|
|
||||||
proxyCPP = @CPP_FOR_BUILD@
|
|
||||||
proxyCPPFLAGS = @CPPFLAGS_FOR_BUILD@
|
|
||||||
proxyCXX = @CXX_FOR_BUILD@
|
|
||||||
proxyCXXFLAGS = @CXXFLAGS_FOR_BUILD@
|
|
||||||
proxyLD = @LD_FOR_BUILD@
|
|
||||||
proxyLDFLAGS = @LDFLAGS_FOR_BUILD@
|
|
||||||
AM_CFLAGS += $(DEFINES_FOR_BUILD)
|
|
||||||
else
|
|
||||||
proxyCC = @CC@
|
|
||||||
proxyCFLAGS = @CFLAGS@
|
|
||||||
proxyCPP = @CPP@
|
|
||||||
proxyCPPFLAGS = @CPPFLAGS@
|
|
||||||
proxyCXX = @CXX@
|
|
||||||
proxyCXXFLAGS = @CXXFLAGS@
|
|
||||||
proxyLD = @LD@
|
|
||||||
proxyLDFLAGS = @LDFLAGS@
|
|
||||||
AM_CFLAGS += $(DEFINES)
|
|
||||||
endif
|
|
||||||
|
|
||||||
CC = $(proxyCC)
|
|
||||||
CFLAGS = $(proxyCFLAGS)
|
|
||||||
CPP = $(proxyCPP)
|
|
||||||
CPPFLAGS = $(proxyCPPFLAGS)
|
|
||||||
CXX = $(proxyCXX)
|
|
||||||
CXXFLAGS = $(proxyCXXFLAGS)
|
|
||||||
LD = $(proxyLD)
|
|
||||||
LDFLAGS = $(proxyLDFLAGS)
|
|
||||||
|
|
||||||
AM_CXXFLAGS = $(AM_CFLAGS)
|
|
||||||
|
|
||||||
include ../Makefile.sources
|
|
||||||
|
|
||||||
noinst_PROGRAMS = builtin_compiler
|
|
||||||
|
|
||||||
if !CROSS_COMPILING
|
|
||||||
noinst_LTLIBRARIES = libglslcore.la libglcpp.la
|
|
||||||
|
|
||||||
libglcpp_la_SOURCES = \
|
|
||||||
$(LIBGLCPP_GENERATED_FILES) \
|
|
||||||
$(LIBGLCPP_FILES)
|
|
||||||
|
|
||||||
libglslcore_la_SOURCES = \
|
|
||||||
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
|
|
||||||
$(LIBGLSL_FILES)
|
|
||||||
endif
|
|
||||||
|
|
||||||
builtin_compiler_SOURCES = \
|
|
||||||
$(top_srcdir)/src/mesa/main/hash_table.c \
|
|
||||||
$(top_srcdir)/src/mesa/main/imports.c \
|
|
||||||
$(top_srcdir)/src/mesa/program/prog_hash_table.c\
|
|
||||||
$(top_srcdir)/src/mesa/program/symbol_table.c \
|
|
||||||
$(BUILTIN_COMPILER_CXX_FILES) \
|
|
||||||
$(GLSL_COMPILER_CXX_FILES)
|
|
||||||
|
|
||||||
if CROSS_COMPILING
|
|
||||||
builtin_compiler_SOURCES += \
|
|
||||||
$(LIBGLCPP_GENERATED_FILES) \
|
|
||||||
$(LIBGLCPP_FILES) \
|
|
||||||
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
|
|
||||||
$(LIBGLSL_FILES)
|
|
||||||
builtin_compiler_CPPFLAGS = $(AM_CPPFLAGS)
|
|
||||||
else
|
|
||||||
builtin_compiler_LDADD = libglslcore.la libglcpp.la
|
|
||||||
endif
|
|
|
@ -1,39 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright © 2010 Intel Corporation
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
|
||||||
* to deal in the Software without restriction, including without limitation
|
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice (including the next
|
|
||||||
* paragraph) shall be included in all copies or substantial portions of the
|
|
||||||
* Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
||||||
* DEALINGS IN THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "glsl_parser_extras.h"
|
|
||||||
|
|
||||||
/* A dummy file. When compiling prototypes, we don't care about builtins.
|
|
||||||
* We really don't want to half-compile builtin_functions.cpp and fail, though.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
_mesa_glsl_release_functions(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state)
|
|
||||||
{
|
|
||||||
(void) state;
|
|
||||||
}
|
|
|
@ -35,9 +35,8 @@ libdricore@VERSION@_la_SOURCES = \
|
||||||
$(MESA_FILES) \
|
$(MESA_FILES) \
|
||||||
$(LIBGLCPP_GENERATED_FILES) \
|
$(LIBGLCPP_GENERATED_FILES) \
|
||||||
$(LIBGLCPP_FILES) \
|
$(LIBGLCPP_FILES) \
|
||||||
$(LIBGLSL_FILES) \
|
$(LIBGLSL_GENERATED_CXX_FILES) \
|
||||||
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
|
$(LIBGLSL_FILES)
|
||||||
$(top_builddir)/src/glsl/builtin_function.cpp
|
|
||||||
libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
|
libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
|
||||||
libdricore@VERSION@_la_LIBADD = \
|
libdricore@VERSION@_la_LIBADD = \
|
||||||
../program/libdricore_program.la \
|
../program/libdricore_program.la \
|
||||||
|
|
Loading…
Reference in New Issue