Self-adaptive systems have recently attracted attention because of their ability to cope with changing environments, including sys- tem intrusions or faults. Such software must modify itself to bet- ter fit its environment, and one of the approaches by which we expect this capability to be achieved is the introduction of multi- ple control loops to assess the situation and to determine whether a change in behaviors or configurations is necessary and how to implement the change. Development of such systems with multi- ple control loops complicates the task of identifying components, and could be greatly aided by appropriate tool support. In this pa- per, we propose an architectural compiler for self-adaptive systems, which generates architectural configurations from the goal-oriented requirements descriptions. We also present a framework for gener- ating such configurations with this compiler and a pattern in the requirements description. We evaluate the framework experimen- tally and show that it helps to generate suitable configurations that have high performance, and that the compiler scales well to large input models.