aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-09-03 21:22:17 -0700
committerKenneth Graunke <[email protected]>2013-09-09 14:42:33 -0700
commitc845140a20efa6a30a5465301d1f9b4acea79155 (patch)
tree8b917bbe4fa0eebf9695acee1a6596fc88fcf2c1 /src
parent76d2f73643f5502d88fdc272447753fde8f6438b (diff)
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 <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/.gitignore2
-rw-r--r--src/glsl/Android.mk26
-rw-r--r--src/glsl/Makefile.am17
-rw-r--r--src/glsl/Makefile.sources17
-rw-r--r--src/glsl/SConscript66
-rw-r--r--src/glsl/builtin_compiler/.gitignore5
-rw-r--r--src/glsl/builtin_compiler/Makefile.am98
-rw-r--r--src/glsl/builtin_compiler/builtin_stubs.cpp39
-rw-r--r--src/mesa/libdricore/Makefile.am5
9 files changed, 23 insertions, 252 deletions
diff --git a/src/glsl/.gitignore b/src/glsl/.gitignore
index 2cf5b0007ef..43720f60b5d 100644
--- a/src/glsl/.gitignore
+++ b/src/glsl/.gitignore
@@ -3,6 +3,4 @@ glsl_lexer.cpp
glsl_parser.cpp
glsl_parser.h
glsl_parser.output
-builtin_function.cpp
-builtincompiler
glsl_test
diff --git a/src/glsl/Android.mk b/src/glsl/Android.mk
index f088e67cbe8..8a394265299 100644
--- a/src/glsl/Android.mk
+++ b/src/glsl/Android.mk
@@ -50,32 +50,6 @@ include $(MESA_COMMON_MK)
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
# ---------------------------------------
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
index 2bbad3d65ce..9352848d6d6 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -19,8 +19,6 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = builtin_compiler
-
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/mapi \
@@ -72,31 +70,21 @@ tests_ralloc_test_LDADD = \
$(top_builddir)/src/gtest/libgtest.la \
$(PTHREAD_LIBS)
-if CROSS_COMPILING
libglcpp_la_SOURCES = \
glcpp/glcpp-lex.c \
glcpp/glcpp-parse.c \
$(LIBGLCPP_FILES)
-else
-libglcpp_la_LIBADD = builtin_compiler/libglcpp.la
-endif
glcpp_glcpp_SOURCES = \
glcpp/glcpp.c \
$(top_srcdir)/src/mesa/program/prog_hash_table.c
glcpp_glcpp_LDADD = libglcpp.la
-libglsl_la_SOURCES = builtin_function.cpp
libglsl_la_LIBADD = libglcpp.la
-if CROSS_COMPILING
-libglsl_la_SOURCES += \
+libglsl_la_SOURCES = \
glsl_lexer.cpp \
glsl_parser.cpp \
$(LIBGLSL_FILES)
-else
-libglsl_la_LIBADD += \
- builtin_compiler/libglslcore.la
-endif
glsl_test_SOURCES = \
$(top_srcdir)/src/mesa/main/hash_table.c \
@@ -168,6 +156,3 @@ CLEANFILES = \
glcpp/glcpp-parse.h \
glsl_parser.h \
$(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
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index 3e706efeaa9..2f7bfa16388 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -105,20 +105,7 @@ GLSL_COMPILER_CXX_FILES = \
$(GLSL_SRCDIR)/standalone_scaffolding.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_CXX_FILES = \
- $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
- $(GLSL_BUILDDIR)/builtin_function.cpp
+ $(GLSL_BUILDDIR)/glsl_lexer.cpp \
+ $(GLSL_BUILDDIR)/glsl_parser.cpp
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index c4ab97c1e08..e386bdfb1b3 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -53,55 +53,25 @@ if env['msvc']:
env.Prepend(CPPPATH = ['#/src/getopt'])
env.PrependUnique(LIBS = [getopt])
-if env['crosscompile'] and not env['embedded']:
- Import('builtin_glsl_function')
-else:
- # Copy these files to avoid generation object files into src/mesa/program
- env.Prepend(CPPPATH = ['#src/mesa/main'])
- env.Command('hash_table.c', '#src/mesa/main/hash_table.c', Copy('$TARGET', '$SOURCE'))
- env.Command('imports.c', '#src/mesa/main/imports.c', Copy('$TARGET', '$SOURCE'))
- # Copy these files to avoid generation object files into src/mesa/program
- 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'])
-
- mesa_objs = env.StaticObject([
- 'hash_table.c',
- 'imports.c',
- 'prog_hash_table.c',
- 'symbol_table.c',
- ])
-
- 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()
-
+# Copy these files to avoid generation object files into src/mesa/program
+env.Prepend(CPPPATH = ['#src/mesa/main'])
+env.Command('hash_table.c', '#src/mesa/main/hash_table.c', Copy('$TARGET', '$SOURCE'))
+env.Command('imports.c', '#src/mesa/main/imports.c', Copy('$TARGET', '$SOURCE'))
+# Copy these files to avoid generation object files into src/mesa/program
+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'])
+
+mesa_objs = env.StaticObject([
+ 'hash_table.c',
+ 'imports.c',
+ 'prog_hash_table.c',
+ 'symbol_table.c',
+])
-glsl_sources += builtin_glsl_function
+compiler_objs += mesa_objs
glsl = env.ConvenienceLibrary(
target = 'glsl',
diff --git a/src/glsl/builtin_compiler/.gitignore b/src/glsl/builtin_compiler/.gitignore
deleted file mode 100644
index ea7d5de9c3a..00000000000
--- a/src/glsl/builtin_compiler/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-builtin_compiler
-glcpp-lex.c
-glcpp-parse.c
-glcpp-parse.h
-glcpp-parse.output
diff --git a/src/glsl/builtin_compiler/Makefile.am b/src/glsl/builtin_compiler/Makefile.am
deleted file mode 100644
index 5f1a995c3ac..00000000000
--- a/src/glsl/builtin_compiler/Makefile.am
+++ /dev/null
@@ -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
diff --git a/src/glsl/builtin_compiler/builtin_stubs.cpp b/src/glsl/builtin_compiler/builtin_stubs.cpp
deleted file mode 100644
index dfa5d324e7f..00000000000
--- a/src/glsl/builtin_compiler/builtin_stubs.cpp
+++ /dev/null
@@ -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;
-}
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
index 56ceeb7141a..106c7db9b6c 100644
--- a/src/mesa/libdricore/Makefile.am
+++ b/src/mesa/libdricore/Makefile.am
@@ -35,9 +35,8 @@ libdricore@VERSION@_la_SOURCES = \
$(MESA_FILES) \
$(LIBGLCPP_GENERATED_FILES) \
$(LIBGLCPP_FILES) \
- $(LIBGLSL_FILES) \
- $(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
- $(top_builddir)/src/glsl/builtin_function.cpp
+ $(LIBGLSL_GENERATED_CXX_FILES) \
+ $(LIBGLSL_FILES)
libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
libdricore@VERSION@_la_LIBADD = \
../program/libdricore_program.la \